Computer Science II (CS 171)
Dr. William J. Joel, WS 110, 7-9353
Project No. 3 (12 points)
(Due Wednesday October 23, 2002)

Problem: To create a program that inputs a simple arithmetic expression from the user, written using postfix notation, and, using stacks, evaluates the expression written , returning the result to the user. The program should be able to evaluate addition, subtraction, multiplication, and division.
Task:
  • Develop an algorithm for evaluating a postfix arithmetic expression using stacks.
  • Implement this program in C++ using the class cStack. This program should provide some sort of feedback indicating "how" it is performing the evaluation at each step in the process.
  • Test your program on the following expressions:
    • 10
    • 5 1 +
    • 10 2 4 -*
    • 6 4 3 / 7 2 - *  +
  • Submit copies of your handwritten design (algorithm), printouts of all modified source code files, a printout of  your screen capture, and an executable version of your program on disk.
Notes:
  • See pages 138-141 in your text for some ideas.
  • Please refer to Project Submission Guidelines for more information on how to submit a project.
  • Feel free to add whatever features you wish to this program. These additions will be critiqued but will have no impact on your project grade whatsoever.