How to handin.
Points : 30
Weight : 3%
Due : Monday Jun 7, 2004 @11:00 pm
Note : Late assignments will be accepted only with the instructor's pre-approval.
NOTE: the interface will not change, only the implementation and private members.
The stack needs the following methods:
Make an empty stack. For each character read from the data file if the character is an opening symbol, push it onto stack If it is a closing symbol, then if stack is empty report an error. Otherwise, pop the stack. If the symbol popped is not the corresponding opening symbol, then report an error. At the end of the data file, if the stack is not empty report an error.
Write a program that checks a user-supplied C++ source file for unbalanced symbols using the algorithm above and your stack class. Test your program thoroughly.
University of Lethbridge Home Page