java assignment4