Homework for 2nd week (Java)