Assignment2: Basic java implementation and debugging