Java Tutorial Assignment 4