First Advanced Java homework assignment