Search:

Type: Posts; User: DUE IN 4 HOURS

Search: Search took 0.07 seconds.

  1. Re: FractionCalculator StringTokenizer with parsing DUE IN 4 HOURS

    i know how to fix that "bug" you press ctrl z and reinitialize all the variables
  2. Re: FractionCalculator StringTokenizer with parsing DUE IN 4 HOURS

    I wish, this is due in just under two hours and ive got a little more than an hour to work on it. i have no idea what the problem is i think i will have to skip class and get an excuse note somehow...
  3. Re: FractionCalculator StringTokenizer with parsing DUE IN 4 HOURS

    i removed the " = 0" from all my variables and i got this when i ran the program:
    Exception in thread "main" java.lang.Error: Unresolved compilation problems:
    The local variable firstdenom may...
  4. Re: FractionCalculator StringTokenizer with parsing DUE IN 4 HOURS

    i added System.out.println(firstnum + " " + secondnum + " " + finalnum); to run after the error message and then input 2/3 + 1/3 which should produce an error because my calculator asks for 3...
  5. Re: FractionCalculator StringTokenizer with parsing DUE IN 4 HOURS

    int firstnum = 0; //first numerator
    firstnum = Integer.parseInt(st1_sub2.nextToken());
    this didn't do that?
  6. Re: FractionCalculator StringTokenizer with parsing DUE IN 4 HOURS

    I think I've already done what your saying I should do.
    int firstnum = 0; //first numerator
    firstnum = Integer.parseInt(st1_sub2.nextToken());
  7. Re: FractionCalculator StringTokenizer with parsing DUE IN 4 HOURS

    I don't think I understand what you are saying. If you could make the changes to my code and post your response that way it would be really helpful to me.
  8. Re: FractionCalculator StringTokenizer with parsing DUE IN 4 HOURS

    no this is a fraction calculator 2/3 + 1/3 + 1_2/3 not an integer calculator 1 + 2 + 3
  9. Re: FractionCalculator StringTokenizer with parsing DUE IN 4 HOURS

    if(finalint!=0 && finaldenom!=1 && finaldenom!=0 && finalint>0)

    why are you saying if finalint is NOT 0 AND finalint is greater then 0.. its the same thing unless it goes negative. Try removing...
  10. FractionCalculator StringTokenizer with parsing DUE IN 4 HOURS

    Whenever I input fractions I just get back my own error message, (the error message I send as System.err.println("There was an error in your input, try again."); ) or nothing at all. I think it might...
Results 1 to 10 of 10