CS 1401, Quiz 12, MW 9-10:20 version

Date: Wednesday, November 20, 2013
Name (please type legibly, ideally in block letters): ______________________________________________________________________

For each county, income-per-person can be obtained by dividing the overall income of the county by its population. Write a method that, given:

returns the income-per-person in this county. For example, if the index is i = 1, the overall income of the corresponding country is overall[1] = 10,000 and the population of this country is population[1] = 1,000, your method should return 10. Use try-catch to catch both possible exceptions: Return −1 if the first exception occurs and −2 if the second exception occurs.