Professional Documents
Culture Documents
Assignment#01: Sample Output
Assignment#01: Sample Output
Assignment#01
Question: Write a program that convert infix notation into postfix notation and
finally evaluate the expression? Your output should consist of input expression,
followed by its corresponding postfix expression, followed by the answer. The
output (including the original infix expressions) must be clearly formatted (or
reformatted) and also clearly labelled.
Sample output:
Infix:
Postfix:
Answer:
3 + 4 - 1
3 4 + 1
6
You must use the linked implementation of the stack. In addition, you must
implement a template, and copy constructor. You must devise a Boolean function
that takes two operators and tells you which has higher precedence. This is helpful
when you need to compare the next input symbol to the top of the stack element.