>
>
>
> Description:
>
> An arithmetic _expression involving the binary operators addition
> (+), subtraction (-), multiplication (*), and division (/) can be
> represented by using a binary _expression tree. In a binary
> _expression tree, each operator has two children, which are either
> operands or sub expressions. Leaf nodes contain an operand which is a
> single digit in the range from 0 through 9. No leaf nodes contain a
> binary operator. The left and right sub trees of an operator describe
> a sub _expression that is evaluated and used as one of the operands
> for the operator.
>
>
>
> Requirements:
>
>
> The program should display the following command base menu when the
> it runs:
>
> press 'i' to enter an infix _expression.
>
> press 'p' to show the prefix _expression of the given infix
> _expression.
>
> press 't' to show the postfix _expression of the given infix
> _expression.
>
> press 'e' to evaluate the value of the postfix _expression.
>
> press 'x' to exit the program.
>
> // YOU MUST USE THESE PROTOTYPED FUNCTIONS TO ORGANIZE YOUR
> CODE.
>
>
>
>
>
>
>
> // check the validity of the _expression by checking
> each character in this string from 0-9 and operators ( +, -, *, / )
>
> returns 1 if _expression is valid.
>
> int isValid (const string &exp ) {
>
>
>
> // write your code here.
>
>
>
> }
>
>
>
>
>
> // evaluates the given postfix _expression and returns
> the result.
>
> int evaluatePostfix ( const string &exp) {
>
>
>
> // write your code here.
>
>
>
> }
>
>
>
>
>
> // converts the infix _expression to postfix and
> returns it.
>
> string toPostfix ( const string &exp ) {
>
>
>
> // write your code here.
>
>
>
> }
>
>
>
>
>
> // converts the infix _expression to prefix and
> returns it.
>
> string toPretfix ( const string &exp ) {
>
>
>
> // write your code here.
>
>
>
> }
>
> Plz send me the .h and .cpp files separately urngent please.
>
You'd better hurry, or you won't finish your homework soon. I doubt that
someone will help you with these. As many other guys have said before, we're
not here to solve your homework. Please realise that too many of us (if not
all) have a job and many duties to do. So we can waste precious time in
solving homework. Even if we were itching our stomaches, you should do the
effort. If not, you'll never learn.
------------------------ Yahoo! Groups Sponsor --------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/EbFolB/TM
--------------------------------------------------------------------~->
To unsubscribe : [EMAIL PROTECTED]
Yahoo! Groups Links
<*> To reply to this message, go to:
http://groups.yahoo.com/group/Programmers-Town/post?act=reply&messageNum=4947
Please do not reply to this message via email. More information here:
http://help.yahoo.com/help/us/groups/messages/messages-23.html
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/Programmers-Town/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
Re: (PT) Dear friends I've to solve this as a assignment but it is not working from me so
Fernando Arturo G�mez Flores Thu, 30 Dec 2004 23:03:22 -0800
- (PT) Dear friends I've to solve this as a ass... zrsjana
- Fernando Arturo G�mez Flores
