Can you pls help me in java program....

i want to make a java program for binary trees. ill ask for mathematical equation then the program will display the equation into binary tree, in pre-order and post-order.
[178 byte] By [aghiea] at [2007-11-26 18:15:47]
# 1
Out Sourcing home work huh ;-)
AbiSSa at 2007-7-9 5:49:20 > top of Java-index,Java Essentials,Java Programming...
# 2
A nice little project and I'm sure someone will be able to assist you. What are you having problems with?
sabre150a at 2007-7-9 5:49:20 > top of Java-index,Java Essentials,Java Programming...
# 3

> i want to make a java program for binary trees. ill

> ask for mathematical equation then the program will

> display the equation into binary tree, in pre-order

> and post-order.

I forgot wat all tat means... Tell me... I'll do ur home wrk ;-)

Give a example

AbiSSa at 2007-7-9 5:49:20 > top of Java-index,Java Essentials,Java Programming...
# 4
i think pre-order is1 + 3will become+/\ 13correct me if i'm wrong.. or is this post-order? or am i on another planet? lolss
albertsesea at 2007-7-9 5:49:20 > top of Java-index,Java Essentials,Java Programming...
# 5

here's the example input for my topic...

example input..

((23x^2)+(14y^3))/((4x^2)-(3y+x))

the program will show this:

pre-order

- + * 23 ^ x 2 * 14 ^ y 3 - * 4 ^ x 2 + * 3 y x

post-order

23 x 2 ^ * 14 y 3 ^ * + 4 x 2 ^ * 3 y * x + - /

tree(optional):

/

|

|__

||

+-

|__|

|| ||

***+

__|____|____|____|__

||| || | | |

23^14^ 4^ *x

__|____|____|____|__

| || || || |

x2y3 x 2 3y

PLS HELP ME TO DO THIS!!!

aghiea at 2007-7-9 5:49:20 > top of Java-index,Java Essentials,Java Programming...
# 6
1 + 3 is in-order. I believe pre-order is + 1 3 and post-order is 1 3 +; otherwise it's the other way around.
OleVVa at 2007-7-9 5:49:20 > top of Java-index,Java Essentials,Java Programming...
# 7
Pre-Order>Root ->Left Subtree->Right Subtree.Post-Order-->Left Subtree->Right Subtree->Root.In-Order>Left Subtree->Root->Right Subtree.
qUesT_foR_knOwLeDgea at 2007-7-9 5:49:20 > top of Java-index,Java Essentials,Java Programming...
# 8

here's the example input...

example input..

((23x^2)+(14y^3))/((4x^2)-(3y+x))

the program will show this:

pre-order

- + * 23 ^ x 2 * 14 ^ y 3 - * 4 ^ x 2 + * 3 y x

post-order

23 x 2 ^ * 14 y 3 ^ * + 4 x 2 ^ * 3 y * x + - /

i put my example there but the tree was misaligned.

aghiea at 2007-7-9 5:49:20 > top of Java-index,Java Essentials,Java Programming...
# 9
I forgot how to do it exactly, but you're gonna implement a stack..Like if the first character is a (, then push it into the stack.. Something like that..
albertsesea at 2007-7-9 5:49:20 > top of Java-index,Java Essentials,Java Programming...
# 10
here's my example input...example input..(23x^2+14y^3)/(4x^2-(3y+x))the program must show this:pre-order- + * 23 ^ x 2 * 14 ^ y 3 - * 4 ^ x 2 + * 3 y xpost-order23 x 2 ^ * 14 y 3 ^ * + 4 x 2 ^ * 3 y * x + - /
aghiea at 2007-7-9 5:49:20 > top of Java-index,Java Essentials,Java Programming...
# 11
DoYourOwnHomeworkYou're not asking for "help". You're asking for someone to just do it for you. Not likely gonna happen. Better get cracking!
warnerjaa at 2007-7-9 5:49:20 > top of Java-index,Java Essentials,Java Programming...
# 12

> Do

> Your

> Own

> Homework

>

> You're not asking for "help". You're asking for

> someone to just do it for you. Not likely gonna

> happen. Better get cracking!

Abiss would do it (to "Get the Dukes"), but I doubt he would be successful at it. (I think he misspelled his moniker. It should be abyss.) ;-)

masijade.a at 2007-7-9 5:49:20 > top of Java-index,Java Essentials,Java Programming...
# 13
mr/ms warnerja, i just want to know the logic not the real answer. our prof gave this thing without even explaining it to us / without giving us just tips in this. were just newbie in java. i dont know what our prof thinking about us.
aghiea at 2007-7-9 5:49:20 > top of Java-index,Java Essentials,Java Programming...
# 14
I know, it's always the prof's fault. They're supposed to be able to make you become a pro at the subject matter, regardless of whether or not you have an aptitude for it or the appropriate amount of intelligence as a prerequisite.P.S. Was this not obviously a flame?
warnerjaa at 2007-7-9 5:49:20 > top of Java-index,Java Essentials,Java Programming...
# 15

> mr/ms warnerja, i just want to know the logic not the

> real answer. our prof gave this thing without even

> explaining it to us / without giving us just tips in

> this. were just newbie in java. i dont know what our

> prof thinking about us.

Maybe your prof did it so that you could learn how to figure out things on your own. IMO that is the most valuable skill a programmer can have, so I would suggest you develop it.

zadoka at 2007-7-21 17:19:47 > top of Java-index,Java Essentials,Java Programming...
# 16
i dont know if he already did it. our subj is just algorithm but he wants us to make a java program about that topic
aghiea at 2007-7-21 17:19:47 > top of Java-index,Java Essentials,Java Programming...
# 17
i have done this exact same thing once a long time ago. i probably still have teh codez
mkoryaka at 2007-7-21 17:19:47 > top of Java-index,Java Essentials,Java Programming...