CS 206: Data Structures
Exercise#11

Due on Tuessday, March 25

In this exercise, you will build on the List ADT implementation of Exercise 10 by adding appropriate exceptions that may be raised. Create a single exception class called ListException. In each instance where an exception is to be raised, include an appropriate message informing about the cause of the exception. The message should also include the method name where the exception occured. Write/modify the test program to demonstrate at least three of these exceptions. Hand in a prinout of the new List ADT class, the exception class, and the console window showing the exceptions. You may need to annotate in the latter what condition caused the exception.

Back to CS206 Course Materials