Homework for Java Project