Java Tutorial Assignment 2