Lab Exercise #5
for lab meeting Wednesday, Nov. 2, 2005
The purpose of this lab is to work with LIFO stacks; it depends only on
Section 6.1.
Copy the file jss2/StackADT.java
into your own filesystem; call this file Stack.java.
Now modify it so it is not
an interface, but rather an ordinary class.
Now add stubs for the methods, write javadoc comments, and create
a javadoc page for it. Note: to make the file compilable, wherever an Object is returned, you can
write return null;
Now complete the stack class by filling in the method bodies to
use a linked list to represent a stack object. Note that you can use LinkedNode again for the basic
node methods.
Finally, write a test program that uses stack elements of type String.