Second year Java programming project. First coursework