javaOOP homework