Lab 10 - Midterm 2 solutions and Exception Handling

The midterm solutions can be found in the Solutions section.

Purpose: To learn how to use try, throw and catch in C++.

For this lab, we will be modifying the code from Lab 9 to use exception handling. Modify stack.h, stack.cpp and your version of lab9main.cpp (or the Solution Key version) to throw and catch the following exceptions:

For both the EmptyStack and OutOfMemory exception classes, just define an empty class in stack.h above the definition for stackNode.

Email your stack.h, stack.cpp and lab9main.cpp files to me