Question: Java Programing Calulator for Reverse Pollish Notation. This program will conduct RPN method on an expression using switch staments, stack data structures, and different type

Java Programing Calulator for Reverse Pollish Notation.

This program will conduct RPN method on an expression using switch staments, stack data structures, and different type of hierachies corresponding to the implementation.

Java Programing Calulator for Reverse Pollish Notation. This program will conduct RPN

Overview: So user will be entering an expression in command line and will be getting the following output: $ java Calculator 1 3 P 2T 13+2 8 -Stack data structure -Recursive algorithms Switch statements -hierarchies type, expression tree(nodes, operator or operand) Create a Java Reverse Polish Notation Calculator using the stack method. In this program the user will enter arguments in the command line(assuming only one expression will be given and will be separated by a whitespace) and then execute the program; printing out the form using logical operators instead of letters and the the correct equation, using parentheses when necessary, and then printing the value of the expression at the end. When implementing the program, use: D (for division), T(for multiplication), P(for addition), M(for minus) An example when implementing your methods, keep in mind this idea of switch statements: code here Swtich (argument Case P: stack.push(lhs rhs Case M: stack.push(lhs +rhs //finish code Return stack.po Make sure you keep this idea in mind when implementing your program, switch statements will be necessary when switching through the letters for symbols and then printing out the correct form that will be valued at the end finalizing the expression tree

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!