CS 1401 Assignment #12

Date Assigned: Monday, November 13, or Tuesday, November 14, 2006.

Due Date: Monday, November 20, or Tuesday, November 21, 2006, before the beginning of your lab section.

Objective: The main objective of this assignment is to learn to handle exceptions.

Programming assignment: Redo Programming Assignment 6 on pp. 438-439 of the book (this was our Asssignment 7). If the user enters a negative birth rate, a negative death rate, or a population less than 2, throw and handle an appropriate exception and prompt the user to enter another set of numbers.

For extra credit: do programming assignment 7 on p. 527 in such a way that your program handles exceptions such as division by zero.

Homework assignment: on a separate sheet of paper, solve Ex. 4 and 6 at the end of Chapter 12 (on pp. 799 and 800).

Deliverables: as instructed by your TA.