subject
Engineering, 16.04.2020 04:43 windmadness5331

A menu driven program:1- ask to enter an inorder arithmetic expression, the input should be fully parenthesized2- display the infix order of the expression3- display the prefix order of the expression4- evaluate the expression and display the answer (could be done by converting the infix expression into a postfix expression by using a stack)details are shown in the picture below :

Project Description: An Expression Tree Builder/Evaluator An arithmetic expression can be represented using a binary tree whose leaves are associated with variables or constants, and whose internal nodes are associated with one of the operators +, -, *, and . Each node has a value associated with it. write an implementation of the BǐExpTree class. You can use either array-based or linked-based implementation. The BiExpTree class has the following methods 1.BİExpTree0: to construct an empty binary expression tree 2. CreateExp (exp) takes a fully parenthesized expression and builds a binary expression tree representation fort. You may assume that all operators are values (variables are not required). 3. prefix) displays the prefix form of the expression 4. infix0: displays the infix form of the expression stored in the 5. evalExp0: evaluates the arithmetic expression stored in the stored in the calling BiExpTree object calling BiExpTree object calling BiExpTree object and returns its value. gram: Write a menu-driven program to implement an expression tree builder and evaluator. The menu includes the following options 1. Input new arithmetic expression. The program w prompt the user to enter a fully parenthesized arithmetic expression. A binary expression tree corresponding to that expression is created. You may assume that only valid input is expected 2. Display prefix form of expression The programw invoke the prefix) method from the BİExpTree class to display a prefix form of the expression. 3. Display infix form of expression. The program invoke the infix method from the BİExpTree class to display an infix form of the expression. 4. Evaluate expression. The program wl call the EvalExprO method from the BİExpTree class. 5. Exit.

ansver
Answers: 2

Another question on Engineering

question
Engineering, 04.07.2019 18:10
Consider a large isothermal enclosure that is maintained at a uniform temperature of 2000 k. calculate the emissive power of the radiation that emerges from a small aperture on the enclosure surface. what is the wavelength ? , below which 10% of the emission is concentrated? what is the wavelength ? 2 above which 10% of the emission is concentrated? determine the wavelength at which maximum spectral emissive power occurs. what is the irradiation incident on a small object placed inside the enclosure?
Answers: 2
question
Engineering, 04.07.2019 18:20
Have a greater impact on maintenance productivity than any other support group. (clo5) a)-the top management b)-inventory and purchasing c)-sub-contracting d)-cmms
Answers: 2
question
Engineering, 06.07.2019 06:20
Adielectric is an insulating material or a very poor conductor of electric current. (true , false )
Answers: 1
question
Engineering, 11.07.2019 00:40
Along 8-cm diameter steam pipe whose external surface temperature is 90°c connects two buildings. the pipe is exposed to ambient air at 70c with a wind speed of 50 km/hr blowing across the pipe. determine the heat loss from the pipe per unit length. (b) air at 50°c enters a section of a rectangular duct (15 cm x 20 cm) at an average velocity of 7 m/s. if the walls of the duct are maintained at 10°c, determine (i) the length of the tube for an exit temperature of air to be 40 °c (ii) the rate of heat transfer from the air and (iii) the fan power needed to overcome the pressure drop in this section of the duct.
Answers: 2
You know the right answer?
A menu driven program:1- ask to enter an inorder arithmetic expression, the input should be fully pa...
Questions
question
Chemistry, 20.07.2019 22:00