Question: My question is essentially lets say I have a string that is in the form of a equation 1+234 essentially this equation in a computer

My question is essentially lets say I have a "string" that is in the form of a equation 1+234 essentially this equation in a computer language does not follow an order of operations. It needs parenthesis to change this being left associative (1+(2x(34))) we could break thia down into a tree where is the start node trickling down. This is a warm up excercise that will help me and my partner understand our project. We want to develop code in java where we can enter in a equation as a set of strings WITHOUT the parenthesis in the code and spit out the code with parenthesis 1+234 -> (1+(2(34))) as well as a polish notation version.

I need help in understanding

My question is essentially lets say I have a "string" that is

we had gotten to this point and our professor has given hints about the structure of our code. We will be doing the project in Java. If an example could be written in Java to help me understand it would be greatly appreciated. Again this is only a warm up excercise to help us understand the upcoming project so the solution should be simply done short in Java.

Class Ned double eval class OP Node extends Node Nele left N de right Class NumNode eereds Nd arm date we evac) double ela eva cave t return

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!