Source code for 1st java assignment