Search:

Type: Posts; User: patriots1049

Search: Search took 1.03 seconds.

  1. [SOLVED] Re: Using Stack Data Type to Solve an Infix Expression

    ***UPDATE***

    I got it to work.. but not fully. I can enter an expression like 5 + 5 and it will work. ( 5 + 5 )... will not work. And if I enter an expression without spaces it will not work.
    ...
  2. [SOLVED] Re: Using Stack Data Type to Solve an Infix Expression

    That's excellent information to know. Thanks! I'll definitely take a look at the formatter.

    But anyways, I'm just testing it out with a simple expression (8+8) ... and that doesn't work. It needs...
  3. [SOLVED] Re: Using Stack Data Type to Solve an Infix Expression

    That's excellent information to know. Thanks! I'll definitely take a look at the formatter.

    But anyways, I'm just testing it out with a simple expression (8+8) ... and that doesn't work. It needs...
  4. [SOLVED] Re: Using Stack Data Type to Solve an Infix Expression

    This is the psuedocode provided by the teacher as well.


    Algorithm evaluateInfix (infix)
    // Evaluates an infix expression.
    operatorStack = a new empty stack
    valueStack = a new...
  5. [SOLVED] Re: Using Stack Data Type to Solve an Infix Expression

    I would love to format it that way but my teacher is very strict on using "his" guidelines. So the way I have it formatted is the way HE thinks is best. But I did fix that stupid error on my part and...
  6. [SOLVED] Re: Using Stack Data Type to Solve an Infix Expression

    Alright.. wow, I didn't even notice that. I fixed it now I am receiving this error:


    Exception in thread "main" java.util.EmptyStackException
    at java.util.Stack.peek(Stack.java:85)
    at...
  7. [SOLVED] Using Stack Data Type to Solve an Infix Expression

    Hello! I have been given the assignment to use two ( 2 ) stacks to evaluate an infix expression. I cannot switch to postfix or prefix, then solve. It has to be a direct computation. I have been...
Results 1 to 7 of 7