Computer Science 252
Problem Solving with Java
Fall 2014, The College of Saint Rose
Agenda
Extend the ShirtAndPants example to include a third type of article of clothing. Maybe it's warm and you need shorts. Or it's cold and you need a hat. Your new class should be an implementation of the Laundry interface. The only requirements are that your new object consists of at least 3 graphics primitives, at least 1 of which can be colored randomly, and that it can reasonably implement all of the methods required by the Laundry interface. Also modify the ShirtsAndPants class to create objects of your new type with equal probability as the existing TShirt and Pants objects. You should not need to make any other changes to the ShirtAndPants class.
Please submit only the Java file for the new class you create that implements the Laundry interface in Submission Box under "InClass13" before you leave class.
Due at the start of class, Tuesday, October 14.
Please submit answers to these questions in Submission Box under "LA13" or in hard copy by the start of our next class. We will discuss these questions at the start of class, so no late submissions are accepted. Please be sure that your name is clearly indicated in all submissions.
BDM Excercise 10.1.7, parts a and b, p. 258. You need not implement this in BlueJ unless you wish to do so. (8 points)
Terminology
Examples
Links