CS 112 - Lab 10
Balancing Symbols via Linked Stacks/C++


Section 1: Introduction

The goal of this lab is to:

You will not be given any files as in past labs.

Section 2: Code Development

You must use the following declarations (in stack.hh):
                enum Boolean { False, True };
		typedef char StackEntry;

	       struct Node {
		StackEntry   entry;
		Node         *next;
		};
You are to implement a class called Stack having public member functions and private members (data and functions). This class definition should be contained in a file named stack.hh.

Warning:

Stack class member functions used by main( ) should have public access in your class Stack.

Use the C++ iostream library for output to the screen (i.e., cout) in your main( ) function (contained in the file main.cc).

Be sure to test your program with a variety of input as you did in lab 2. Be sure that each Error Condition is appropriately captured. The TA's will be grading your program with a variety of input files in order to test correctness (as was done for lab 2).

Section 3: Handing in your C code and answers

When you have completed this lab assignment, you should have the following files in your ~/cs112/lab10 directory: Then, to submit your program(s) for grading, issue the command
 ~cs112/submit lab10 
at your UNIX prompt. This utility program will copy your programs for grading and an electronic mail message will be sent to you to acknowledge your submission. You may check the status of your submission at any time by typing the command
 ~cs112/query lab10 
at your UNIX prompt. You will automatically receive an electronic mail message confirming the status of your lab submission.

No questions this lab!

For credit on this lab, your software must be received by midnight Wednesday, April 30.

Note: Always bring your ID with you to lab.