completes assignment 3, chapter 7, java programming

Signed-off-by: Alexander Skjolden <alex@plastboks.net>