The stub of remove() should look like this:
Item ArrayQueue::remove() {
}
The remove() method should behave as follows:
- If the queue is empty, throw an EmptyQueueException;
- Otherwise:
- Store the item at index myFirstIndex in myArrayPtr into local variable result;
- Set myFirstIndex to (myFirstIndex + 1) modulus myCapacity;
- Subtract 1 from mySize; and
- Return result.