Exercise 1.3

This is the easiest way of doing exercise 1.3 from the book Introduction to Java by Y.Daniel Liang.