Java Tutorial Assignment 3