Alright, my brain is almost fried after hours of thinking and trying to get this to work, I was able to get my program to work with correct input, but I can't seem to get my program to catch extra parenthesis errors or errors in the infix notation. Help please
using this as a test program/driver, errors are described in comments:
any ideas on improving/simplifying the algorithm would be nice too, because mine looks like a mess :/
Edit: fixed one problem for input str7. Still working the rest...
Why are you calling System.exit()? That can be a dangerous bit of code to use; if you are multi-threading and there is something critical in another thread, calling System.exit() may terminate that thread with its task incomplete.
What is your algorithm? Write it out in simple terms like this
I think you need to go back to square 1 with your pencil and paper, and write down an algorithm for matching brackets eg ()  etc. How are you going to be able to parse (1 + 2) * (3 + 4) and get the correct answer of 21?
Oh, we don't need to evaluate the expression for this project, just to convert the notation. My class already did postfix evaluation in a past project already. I've finished this project already, and thanks for the help Campbell.