Queue Exceptions
Modify the static queue class used in Program 18-5 as follows.
1. Make the isFull member private.
2. Define a queue overflow exception and modify enqueue so that it throws this exception when the queue runs out of space.
3. Define a queue underflow exception and modify dequeue so that it throws this exception when the queue is empty.
4. Rewrite the main program so that it catches overflow exceptions when they occur. The exception handler for queue overflow should print an appropriate error message and then terminate the program.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.