Implement the CircularQueue
class that extends the AbstractCircularQueue
class
and implement the Object poll()
method.
The following attributes are available from the AbstractCircularQueue
class:
Object[] items
- It's length determines the capacity of the queue. You may assume it is
not nullboolean isEmpty
- true when queue is emptyint frontIndex
- index to the front of the queueint backIndex
- index to the back of the queueYou're challenge is to write tests for this problem described above.
Stuck? You may find these lessons helpful: