Lab 11

Stack Implementation

April 6, 2006

Lab Partners

Everyone should work with one lab partner on this assignment.

Purpose

The purpose of this lab is to give you experience implementing a Stack with a singly linked list that you define yourself (as opposed to using one supplied by the Java libraries).

Preliminaries

Create a BlueJ project named inlab11 and copy the lecture code from Wednesday, April 5th into it.

Task

Do not make any changes to Driver.java or to StackInterface.java. Change the MyStack.java file so that instead of using an underlying implementation of an array, it uses an underlying implementation of a non-circular singly linked list without a dummy header node. You might find it convenient to adapt the code from Friday, March 24th to serve this purpose.

Grading (10 points total)

What to Submit

E-mail all of the java files that are in your final project (except for Driver.java and StackInterface.java since they should not change at all) in one message to your lab TA with the subject CS221-xx inlab11 your-names.

Before Lab Ends

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