I'm having a lot of trouble trying to do this for some reason. I have a class which wants me to evaluate a complex Java expression such as (3 + 5[3*2-4]), using recursion. I think I have an idea on how I want to approach it, but I can't seem to figure out how to solve something really simple first off - like
5-2*10
I have no clue how to do that. They don't allow you to import any outside scripts, nor are you allowed to convert it to a postfix expression.
I don't expect anybody to write me the code but if anybody could send me off in the right direction or give me a little psuedocode I'd really appreciate it - I've spent like two hours to no avail trying to understand how I could use string tokenizers and other stuff to solve it, but I always run into a wall that I don't know how to get around. Thanks a lot in advance!