The stub of
pop()
should look like this:
Item Stack::pop() { }
Because
pop()
is basically the complement of
push()
, and the index of the top item is 1 position "down" from
mySize
, the
pop()
method should behave as follows:
Subtract 1 from
mySize
.
Return the entry of
myArray
whose index is
mySize
.