CS 1401, Quiz 9

Date: Tuesday, March 27, 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 9:

2-4. In some European countries such as Czech Republic, March 28 is celebrated as a Teachers' Day.

2. Define a class Teacher whose elements are teachers; each creature is characterized by its first name, last name, and the number of students this teacher teaches. Your class should contain a constructor method, accessor methods, mutator methods, and a method for computing the number of credit hours generated by this teacher (let us assume that it is number of students multiplied by 3.0).

3. Let us plan for the future. Use your class in the main method to define a new teacher that represents the future you -- this teacher has your name and originally teaches 75 students. Compute and print the number of credit hours that you generated. Then, suppose that you were so good that 15 more students signed for your class. Show how to increase the number of students by 15, and compute and print the new number of credit hours.

4. Trace your program step-by-step.