This key has the Driver class and three additional classes each implementing a queue in a different way.

There is an ArrayList implementation,  an Array implementation and a linked list implantation.

 

All of the required methods are present except for dequeue which will be added later.

 

QueueAsArrayList.java

 

QueueAsLinkedList.java

 

 QueueAsArray.java

 

QueueDriver.java

 

When you are writing your implementations and driver for your stack, you might want to look at these files.

 

Note:  Don’t use a try/catch block instead of using an existing  method that will avoid the exception

           You can’t print the contents of an entire stack or an entire queue without emptying it.

 

 

Here is an indication what what you may have done wrong – i.e. grading criteria for Lab 22 (and probably similar to that for Lab 25)