Lab 9

Queues

March 24, 2005

Lab Partners

Everyone should work with one lab partner on this assignment.

Purpose

The purpose of this lab is to gain experience with the queue ADT and its underlying implementations.

Before Lab Begins

Create a BlueJ project named inlab9 and add the following files to it:

Assignment

Create a Java class named Queue that implements the QueueInterface using a singly linked list that contains a first pointer, a last pointer, no dummy header node, and no dummy trailer node. Use the Node class above in your solution.

Grading

Once your implementation is working, call over Mike or one of the lab consultants. This person will (1) test your program by creating an instance of a Queue on the Java workbench and then extensively testing out the functionality of the five methods, (2) look at the underlying code to make sure that the implementation is correct and (3) report the results to Mike.

Before Lab Ends

Delete any BlueJ projects that you created and empty the recycle bin. Thanks.