CS 1401, Quiz 12, MW 12-1:20 version

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

In each department, the student-to-faculty ratio can be obtained by dividing the number of students by the number of faculty. Write a method that, given:

returns the student-to-faculty ratio of this department. For example, if the index is i = 2, the number of students in the corresponding department is students[2] = 200 and the number of faculty at this department is faculty[2] = 10, your method should return 20. Use try-catch to catch both possible exceptions: Return −1 if the first exception occurs and −2 if the second exception occurs.