LD14: Stacks due Mon 29 Apr 10:00

\begin{purpose}
In this assignment you will:
\begin{itemize}
\item Write code to implement a list-based stack.
\end{itemize}
\end{purpose}

Preparation for Lab Day

Do these steps:

  1. In your workspace, make sure you have the latest homework files from the base repository. Do your work in the hw14 directory. The only code provided is a driver for a non-existent class called MyStack.
  2. We want MyStack to be a list-based stack that hold integer data. Since it will be list-based we need to create a class called StackNode (or ListNode is fine) that will represent a linked list node for holding an integer along with a next pointer. Write and document this class.
  3. Complete stack exercise described on page 61 of the course notes. If you have done that already then just copy your solution to the hw14 directory and change the double types to int. If you have not done the exercise then you'll need to do it now.
  4. Once you have a working stack class that conforms to the driver code, commit your work and push it to your BitBucket repository.

Lab Day

Continue with these steps:

  1. Now that you have a working MyStack class, complete the exercise described on pages 63–65 of the course notes.

  2. Once you have working program, commit your work and push it to your BitBucket repository.