Em Andamento

Expression Tree

This project deals with a simple kind of expression tree, where there are two kinds of nodes:

a) Leaf nodes, which contain a real number as their elements;

b) Non-leaf nodes, which contain a character which is an operation such as +,-,*,/, as their elements, and have exactly two children.

For this project, implement a class for expression trees(ExpressionTree class), including operations for building trees and traversing trees. Also include a recursive function to "evaluate" a non-empty expression tree using these rules:

a) If the tree has only one node(which must be a leaf), then the evaluation of the tree returns the real number which is the nodes element.

b) If the tree has more than one node, and the root contains +, -, *, /, then first evaluate the left subtree, then evaluate the right subtree, and then add, subtract, multiply, divide respectively, the results are returned from the left subtree evaluation, and right subtree evaluation.

For the second part of the program write a driver program that will read a file [url removed, login to view] that will be provided for you (This file will be given to you when you start coding the program). Parse each line from that file to construct an expression tree for each expression . And for each expression tree constructed, output preorder, inorder, postorder traversals of that tree together with the value of the expression tree to a file Results.txt. You should be able to construct an Expression Tree from any kind of expression: Prefix, Infix, or Postfix.

1) You can directly build a tree from Prefix.

2) You can directly build a tree from Postfix.

3) To build a tree form Infix, first convert the expression to Postfix and construct it from Postfix.

Please provide comments in the program.

## Deliverables

1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.

2) Installation package that will install the software (in ready-to-run condition) on the platform(s) specified in this bid request.

3) Exclusive and complete copyrights to all work purchased. (No GPL, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site).

## Platform

The program should be written in java, and i use suns j2sdk version 1.4.1_01 to compile and run the code.

Habilidades: Engenharia, Java, MySQL, PHP, Arquitetura de software, Teste de Software

Ver mais: write a recursive function, tree prefix, tree node, simple recursive function, recursive coding, prefix trees, prefix tree, prefix function, php parse tree, operations on trees, one tree software, number of nodes in a tree, no of trees with n nodes, node of a tree, node in tree, a recursive function, the tree, the parse platform, suns, recursive, Expression, convert node, infix postfix prefix convert program, java project tree, parse expression

Acerca do Empregador:
( 6 comentários ) United States

ID do Projeto: #3017369

Premiar a:

lmxvw

See private message.

$21.25 USD em 7 dias
(125 Avaliações)
4.6

17 freelancers estão ofertando em média $38 para este trabalho

mihaiscortaru

See private message.

$40.38 USD in 7 dias
(160 Comentários)
6.0
emilianbold

See private message.

$42.5 USD in 7 dias
(80 Comentários)
5.9
senzaciosnegyes

See private message.

$24.65 USD in 7 dias
(103 Comentários)
4.9
vaibhavahujavw

See private message.

$25.5 USD in 7 dias
(20 Comentários)
4.7
assertvw

See private message.

$21.25 USD in 7 dias
(12 Comentários)
4.4
shashikhanvw

See private message.

$119 USD in 7 dias
(15 Comentários)
3.8
peterldevel

See private message.

$46.75 USD in 7 dias
(13 Comentários)
3.6
PDan

See private message.

$8.5 USD in 7 dias
(9 Comentários)
3.4
carefulwith

See private message.

$38.25 USD in 7 dias
(13 Comentários)
3.1
kaloyanvw

See private message.

$17 USD in 7 dias
(0 Comentários)
0.0
mokm

See private message.

$34 USD in 7 dias
(0 Comentários)
0.0
piticotjerry

See private message.

$8.5 USD in 7 dias
(0 Comentários)
0.0
nagarajdshe

See private message.

$51 USD in 7 dias
(0 Comentários)
0.0
goldeneyesvw

See private message.

$127.5 USD in 7 dias
(0 Comentários)
0.0
coderx2k

See private message.

$12.75 USD in 7 dias
(0 Comentários)
0.0
sevescu

See private message.

$4.25 USD in 7 dias
(0 Comentários)
0.0