College java assignment