If anyone needs help with this particular problem (converting infix to postfix and evaluating), send me a message. I have a working version of the program and I'd be glad to help.
HI!...I thinked I badly needed ur help..I'm also working w/ that problem and I want to know what's wrong w/ my codes..
Here is my code:
import java.util.*;
import java.lang.String.*;
import java.lang.Object;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
public class InToPre
{
private Stack operators = new Stack();
private Stack operands = new Stack();
private char[] chars = null;
public InToPre(char[] chars)
{
this.chars = chars;
}
private boolean isValid()
{
boolean isValid = true;
// characters in the string can be math symbols '+ - * / ' or be space
// or
// can be paranthises '(' or ')'
// can be a digit
for(int i =0; i