Write a program to read in a postfix expression and output a corresponding infix expression

computer science

Description

Write a program called PostfixToInfix.java to solve the following problem. Write a program to read in a postfix expression and output a corresponding infix expression. You may use any architecture and machinery developed and explained in class at length, as well as code from your solution to the last lab. Your output expression may have as many parethentheses as you decide are necessary for its unambigous evaluation without assuming anything about operator precedence. A postfix expression is defined as in the last lab, and all other details are defined as in class. Error messages for nonsense postfix expressions should be produced as defined in the last lab. You may not use any classes supplied with Java apart from those used in teaching this class. Your program should have behavior as illustrated by the following instance. java PostfixToInfix 1 2 3 + * 1*(2+3)


Related Questions in computer science category


Disclaimer
The ready solutions purchased from Library are already used solutions. Please do not submit them directly as it may lead to plagiarism. Once paid, the solution file download link will be sent to your provided email. Please either use them for learning purpose or re-write them in your own language. In case if you haven't get the email, do let us know via chat support.