7. Queues
Feel free to use your laptop
You are strongly encourage to work with others
When you get stuck, ask those sitting around you for help
Get used to working together in the labs
Peer teaching and peer learning has been empirically shown to be very effective
7.1. Making a Rudimentary Array Queue
Despite not being a great implementation, the goal is to build a RudimentaryArrayQueue
that always keeps the front
of the queue at index 0
. This is idea #1 from the ArrayQueue topic.
Download the
Queue interface
and add it to the projectCreate a
RudimentaryArrayQueue
classComplete the
RudimentaryArrayQueue
class by fully implementing theQueue
interfaceThere will be a lot of overlap with the
ArrayQueue
classConsider creating a private helper method for moving elements down the array after a
dequeue
Create a
RudimentaryArrayQueueTest
class to test theRudimentaryArrayQueue
Make use of the existing
ArrayQueueTest
class as a reference