Question: For C++ PostFix evaluation is needed 1- A postfix expression calculator: Takes as an input a postfix expression, evaluates it, and outputs it final value.

For C++

PostFix evaluation is needed

1- A postfix expression calculator: Takes as an input a postfix expression, evaluates it, and outputs it final value. 2- An infix-to-postfix converter: takes a normal infix expression, and converts it to a postfix expression. The project assignment is the following: 1- Part 1 (100 points): Write a dynamic char stack class, similar than the DynIntStack class defined in chapter 18.2 of the textbook . Then, write the code of the postfix expression calculator, following the algorithm given in class. We consider only one-digit integers, and the division is integer division (meaning 3/2=1). The header of the function should look like: int PostfixCalculator (string postfixExpression){ } Use the following expression to test your code: 34*5*7+3-8+ 675*3+2/+ 2- Part 2 (Bonus 50 points): Use the same class defined in part1, then write the code of the infix-to-postfix converter, following the algorithm given in class. The header of the function should look like: string InfixToPostfixConverter (string infixExpression){ } Use the following expression to test your code: a+(b*c + d)/e (b*b 4*a*c)/(2*a)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!