CS 1401, Quiz 8

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

1. Mark what is covered and what is not covered in Chapter 8:

2-4. Tomorrow is the birthday of Benito Juarez, Mexican statesman and national hero after whom our neighboring city is named. He was born in 1806.

2. Write a method named juarezBirthday for computing how many years old Juarez is at a given year year.

3. Call your method juarezBirthday in the main method to compute how many years have passed from Juarez's birthday until thisYear = 2007. (You do not need to write the entire main method, just the part that assigns the corresponding value to the variable thisYear and calls your method.)

4. Trace, step by step, how the computer will perform the needed computations, and check that the result is indeed correct.