CS 1401, Quiz 7

Date: Monday, October 23, 2006
Name (please type legibly, ideally in block letters): ______________________________________________________________________

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


2. Define a class Circle whose elements are circular creatures; each creature is characterized by its name and its radius R. Your class should contain a constructor method, accessor methods, mutator methods, and methods for computing the diameter 2R, the circumference 2 Pi R, and the area Pi R^2.

3. Use your class in the main method to define a new circular creature "Circy" with radius 3.0. Compute and print Circy's diameter; then, simulate how Circy grows: replace the radius with the larger value 4.0, and compute and print its new diameter.

4. Trace your program step-by-step.