CS 1401, Quiz 12

Date: Tuesday, April 17, 2007
Name (please type legibly, ideally in block letters): ______________________________________________________________________
Class section (9:00 am or 10:30 am):_______________________________

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

2. Define a class Health in which each object has a name and a (body) temperature (in F). Do not forget to include a constructor method, accessor methods, and mutator methods.

3. Considering Health as a superclass, define a subclass ExtendedHealth in which there is also a possibility of changing and returning body temperature in C. Reminder: F = 32 + 1.8 * C and C = (F - 32)/1.8.

4. In the main method, define a new object of type ExtendedHealth with your name and perfect body temperature 97.9, and return its perfect body temperature in C (should be 36.6). Trace your code step-by-step.