CS 1401, Quiz 11
Date: Tuesday, April 10, 2007
Name (please type legibly, ideally in block letters):
Class section (9:00 am or 10:30 am):_______________________________
1. Define a class Cat in which each object has a name and a
weight. Do not forget to include a constructor, accessor
methods, and mutator methods.
2. In the main method,
3. Trace your code line-by-line.
- define an array of 2 cats, in which the first cat "Fluffy" weighs 3
pounds, and the second cat "Tiny" weighs 1.2 pounds, and then
- compute and print
the average weight of the cats.