CS 112
Homework 5

Due on Monday, Oct. 16, 2000, by 12:00 a.m. (midnight)

(Note the different due date accomodating the October break)

To do:

  1. Part 1 Implement the stack abstract data type in C++ following the model shown in class. Provide a simple menu-based test driver for it. You can start by copying the templates I made available here, or copy them directly from the handout directory in the class account.
  2. Part 2 Then perform the following simple modifications: implement an abstract data type for a stack of characters (not integers). Name your class CharStack and the testdriver testCharStack. Design a test driver for it, too. (You can do it by performing simple modifications on the test driver for stacks of integers.)
  3. Part 3 The same, for a stack of CustRec records (the same data structure we used to illustrate templates in C++).
  4. Part 4 (Extra credit): Design a testdriver to test all the three stacks above. You should be careful with the makefile, which will contain 4 different compilations (three for the three classes, one for the main program).

See instructions below on how to name the files for this homework, and how to submit.


Files to submit (for all C++ homeworks)

Header file, all cpp files (class and testdriver), the Makefile and a typescript.

In other words, everything that is needed to recompile you program (source code and Makefile), and a proof that it really works (typescript).
Last modified Oct. 4, 2000.

Ileana Streinu