Lab 09: Hint pop() 2
To throw an exception when the stack is empty, the pop()
method should behave as follows:
If I am empty {
throw a StackException whose method is "pop()" and whose message is "stack is empty".
}
a. Subtract 1 from mySize.
b. Return the entry of myArray whose index is mySize.