Advanced Java - Class #2 Homework assignment