Lab 15, CSC 102, Spring 2012
This lab has two parts.
1 Part I
As part I of this lab, finish your implementation of mergesort on Vectors. See Lab 14 for details.
2 Part II
Define two new exceptions: CantFindSocks and HouseOnFire. They should both extend Exception, making them "checked exceptions."
Define the static putOnShoes method, that accepts an integer representing the hour of the day. If the hour is less than 6, this method should signal the CantFindSocks error. If the hour is exactly equal to 19, this method should signal the HouseOnFire exception. Otherwise, it returns 34.
Define the static getReadyToGo method, that calls putOnShoes. If the CantFindSocks exception occurs, it should print out "leaving the house without socks", and return 12. Otherwise, it should return the result of calling putOnShoes plus 13.
Define the static getOnWithDay method, that calls getReadyToGo. If the HouseOnFire exception occurs, it should catch it, print out "calling fire department" and return -978. Otherwise, it should return the result of the call to getReadyToGo minus 1.
(No test cases are required for this part) Add a "finally" clause to the getReadyToGo method that prints the message "Flobble Blub". Under what circumstances does this clause get evaluated?