
Lesson 16-4: Exceptions
Templates, Operator Overloading, and Exceptions | 419
Name __________________________________________ Date _______________________
Section _________________________________________
Exercise 1: Class SortedList uses a precondition to guarantee that the list is not full before an
insertion is made. Change function Insert so that it throws a string exception if the list is full
when the function is called. Have the driver catch the exception and print an error message. Run
your program using realTwo.dat. (Did you remember to change the documentation in
SortedList?)
Exercise 2: Create a class template SortedList2 that is just like ...