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 myFirst in myArray into local variable result;
- Add 1 to myFirst (modulus myCapacity);
- Subtract 1 from mySize; and
- Return result.