BIT Assignment 1 for Java