College Java assignment