Updated Java Homework 7