added the fourth homework from the Java Basics Course - September 2014