assignment 4 java added