The stub of append() should look like this:
void ArrayQueue::append(const Item& it) {
}
The append() method should behave as follows:
- If the queue is full, throw a FullQueueException;
- Otherwise:
- Set myLastIndex to (myLastIndex + 1) modulus myCapacity;
- Store it in myArrayPtr at index myLastIndex;
- Add 1 to mySize.