CISC220 F2021 Lab3
Revision as of 09:39, 30 August 2021 by Cer (Created page with "==Lab #3== The ''Drozdek'' references below are to the textbook. It shouldn't matter whether you have the 3rd or 4th edition. ===1. C++ programming exercises=== * '''(3 po...")
The Drozdek references below are to the textbook. It shouldn't matter whether you have the 3rd or 4th edition.
1. C++ programming exercises
- (3 points) Drozdek programming assignment 4.10.3 (4.9.3 in 3rd edition): Implement the stack-based delimiter matching algorithm from Drozdek Section 4.1. As in the algorithm, you should read from a file and handle parentheses, square brackets, curly braces, and C++ comments (/* and */ pairs), and skip all other characters that may be mixed in. Use the STL stack class. You may do everything in main.cpp.
- (2 points) Modify this array_queue class to be circular as defined in Drozdek Chapter 4.2. You may refer to the code in figure 4.9, but what you submit should be based on array_queue. Also, please use variable names back for where things are enqueued and front for where they are dequeued as discussed in class. Don't change main.cpp; you should be able to run it to verify that your modified class still works.
- If you have problems with the lines in the #ifdef LINUX sections of main.cpp, just comment out #define LINUX at the top. The only purpose of these lines is to put a delay after each queue element getting printed.
- Include a PDF file <Your Name>_README.pdf which contains the inputs and outputs of your delimiter matching program and several test strings being printed out for your circular array queue program.
- Create a single tar/zip/rar file out of the top-level and all subdirectories. This archive file should be named <Your Last Name>_Lab3.tar (or .zip or .rar, etc.).
- Submit it in Canvas by midnight at the end of Thursday, September 18