The stub of getLast() should look like this:
Item List::getLast() const {
}
The steps it should take are:
- If mySize is not positive OR myLast is NULL:
throw an underflow_error exception.
- Return the value of myItem in the Node whose address is in myLast.