CS 122-01-12F Computer Science II Program 6 solution


Original Work ?
Category: You will Instantly receive a download link for .ZIP solution file upon Payment


5/5 - (1 vote)

Create a directory called “PG6” at the top level of your CS122-01-12F folder. Put all the files pertaining to this assignment in PG6. Place a file called “DONE” in this folder when you have completed this project.
Similar to what was discussed in class, you are to write a program that asks the user to enter a postfix expression. You must build a binary expression tree from the postfix notation, print out the prefix and infix versions of that expression, and print out the answer to which the expression evaluates.
Like the class sample, your program will use only single digit numbers, and will contain no spaces.
The tree manipulation code must be recursive.
Your main class MUST be called “ReversePolish.java”. Your tree and tree node classes may be named however you see fit.