CS 1401, Quiz 12

Date: Monday, November 19, 2007
Name (please type legibly, ideally in block letters): ______________________________________________________________________
Class section (9:30 am or 11:30 am):_______________________________

1. Mark what new material is covered and what is not covered in Chapter 12:

2. Define a class Coat in which each object has a color and a size (in inches). Do not forget to include a constructor method, accessor methods, and mutator methods.

3. Considering Coat as a superclass, define a subclass CoatForExport in which there is also an additional method returning the size in centimeters. Reminder: 1 in = 2.54 cm, so to get the size in cm, you need to multiply the size in inches by 2.54.

4. In the main method, define a new object of type CoatForExport with your favorite color and size 10 inches, and return its size in cm. Trace your code step-by-step.