SENG1110 Java Codes