Homework 4, Exceptions.
Short Description:
Modify your queue class in from homework 3 to throw exceptions when a bad dequeue/front occurs.
Modify the test driver to test the exceptions.
Goals
When you finish this homework, you should have:
- Worked with exceptions in c++
Formal Description
Change the error behavior for Front
and Dequeue
to throw an out_of_range exception rather than printing an error and returning erroneous data. The verbiage in the exception should match the previous verbiage.
Modify QueueTest.cpp
. Change ErrorTest
to test that both exceptions work correctly.
Required Files
A single tar file containing the source code and makefile for this program.
Submission
Submit the assignment to the D2L folder Homework 4 by the due date.