Second home assignment of Programming in Java