Data Structures
FALL 1998
HOMEWORK 1
Due: October 7th
This project is based on Project P-3.3 on page
111 of our text.
Implement two stacks in one array using your
favorite acceptable language. The standard
operations of push, pop,
and top should certainly be supported.
Since this is an exercise, informative messages should be
produced whenever an object is inserted or
removed from either of the two stacks.
If the total lengths of both stacks is too large,
an error message should be produced by a push
just as we always expect an error message if we try to
pop or top from an empty stack.
Test your implementation with sufficient test cases.
Turn in 1) your source listing and 2) output from
your tests. (No disks are needed)