Search:

Type: Posts; User: SchollStang

Search: Search took 0.15 seconds.

  1. Replies
    9
    Views
    2,004

    Re: Post Fixed Math Expressions using Stack

    Ok I removed that line. Now the error says the stack is empty, Exception in thread "main" java.util.EmptyStackException



    while(tokens.hasMoreTokens())
    {
    thisToken = tokens.nextToken();...
  2. Replies
    9
    Views
    2,004

    Re: Post Fixed Math Expressions using Stack

    I do not want to convert "+" to a double, if the program encounters a + I would like it to add the two previous tokens in the string.

    So essentially in case "+": When the we encounter a "+", add...
  3. Replies
    9
    Views
    2,004

    Re: Post Fixed Math Expressions using Stack

    Currently the only thing that works is default in my switch statement(I can output the top item in the stack) I get an error when using any of the other cases, Exception in thread "main"...
  4. Replies
    9
    Views
    2,004

    Re: Post Fixed Math Expressions using Stack

    Code added above
  5. Replies
    9
    Views
    2,004

    Post Fixed Math Expressions using Stack

    Hello, I have been working on a silly little project for class for over a week now. The directions are below in bold

    You may assume the user will enter a one line properly formatted post fixed...
Results 1 to 5 of 5