Modify the source code for the Stack class from Chapter 17, shown in Displays 17.17 through 17.19. Currently, if the user of the class attempts to pop from an empty stack the program prints out an error message and exits. Modify the program so that it instead throws an exception named PopEmptyStackException.
Write a main function that tests the new Stack class, attempts to pop from an empty stack, and catches the PopEmptyStackException exception.
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.