CSC 207 OO in Java homework 6