Assignment 1 Introduction to Programming in Java Solution