Create a java program-takes as input an infix arithmetic


Discuss the below:

Create a Java program that takes as input an infix arithmetic expression then transforms it to a postfix expression and based on a binary tree, it evaluates that expression. For instance, the program takes the following infix expression: (1 + 2) * (3 - 4) / (1 + 2) then transforms it to a postfix expression: 1 2 + 3 4 - * 1 2 + / and then stores it in a binary tree. After that, your program should do the opposite: traverse the binary tree and print out the arithmetic expression in infix format.

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Create a java program-takes as input an infix arithmetic
Reference No:- TGS01934104

Now Priced at $20 (50% Discount)

Recommended (92%)

Rated (4.4/5)