Assignment2.java tested