Winter quarter Java homework