public Fraction (String fractionString)
{
StringTokenizer st = new StringTokenizer(fractionString, "/");
numerator = Integer.parseInt(st.nextToken());
denominator = Integer.parseInt(st.nextToken());
}
I have this so far. How do I change this to ignore parentheses in a fraction?
Example: (3/4) - how do I ignore these parentheses?
Looking at this would I be able to simply do StringTokenizer st = new StringTokenizer(fractionString, "/()"?