Binary Expression Tree

En curso Publicado hace 7 años Pagado a la entrega
En curso Pagado a la entrega

This will be a project expected to be completed within 48 hours. Instructions are provided in the word doc included. This is basically what they are though.

----------------------------------------------------------------------------------------------------------------------------------------

Write a program that will accept a fully parenthesized expression from the user. The program will then build a binary tree to hold the expression. Once the tree is built the program will display the expression in prefix, infix and postfix formats. Finally, the program should evaluate the expression and print the results, e.g. an input of ((3*(8-2))-(1+9)) would produce:

Infix: ((3*(8-2))-(1+9))

Postfix: 382-*19+-

Prefix: -*3-82+19

((3*(8-2))-(1+9)) = 8

Your program must support add, subtract, multiply and divide. If you want to add other binary operators (e.g. ^ or %) feel free to do so.

Place your code in a loop so that the user can enter as many expressions as desired.

I have attached the beginnings of a BinaryExpressionTree. Start with this code. (Do not create a completely different class ).

Programación en C#

Nº del proyecto: #12308061

Sobre el proyecto

Proyecto remoto Activo hace 7 años