java assignment 2