Midterm 2 java 2