Java Imp. Problem 2 complete