Search:

Type: Posts; User: jps

Search: Search took 0.08 seconds.

  1. [SOLVED] Re: Absolute Beginner Here, should be an easy question for anyone really.

    Last but not least... Your original error: java.util.InputMisMatchException
    What if a user is entering the number of employees and accidently hits 3e<enter> before realizing their fat finger hit the...
  2. [SOLVED] Re: Absolute Beginner Here, should be an easy question for anyone really.

    Try it and see. If ever you are not sure what it will do. Back up your hard drive, and try it. (haha)
  3. [SOLVED] Re: Absolute Beginner Here, should be an easy question for anyone really.

    So two other quick notes.
    1. Your formatting is not completely consistent, and really does not follow java convention.
    1a. Sure you dont have to follow java convention, but if you ever work as...
  4. [SOLVED] Re: Absolute Beginner Here, should be an easy question for anyone really.

    Run the program with the following input:
    dept name = test
    #employees = 5
    avgSalary = 3.3333
    and see what you get. (Maybe this is not been covered in your class yet)
  5. [SOLVED] Re: Absolute Beginner Here, should be an easy question for anyone really.

    Let me know how it works out for you. Then if you don't mind post your revised code so other readers and I can all be on the same page again.
  6. [SOLVED] Re: Absolute Beginner Here, should be an easy question for anyone really.

    Yes, I remember. I get that same feeling every time I am able to help someone else understand something. Feels nice
  7. [SOLVED] Re: Absolute Beginner Here, should be an easy question for anyone really.

    Did you try the two if blocks above in place of the if block you had?

    What does that tell you about the boolean variable?
  8. [SOLVED] Re: Absolute Beginner Here, should be an easy question for anyone really.

    Don't rush off to happy land so fast. You have made progress but there are more things I would like to go over.
  9. [SOLVED] Re: Absolute Beginner Here, should be an easy question for anyone really.

    Try this:
    Replace your if with this:

    if (deptName.toLowerCase().equals("stop")) {
    end = true;
    break;
    }

    and then replace that with this:
  10. [SOLVED] Re: Absolute Beginner Here, should be an easy question for anyone really.

    Ahh so by changing your boolean to true, your loop continues to execute. The reason why:

    When you run a while loop you say, while (thisCondition), then you have your body of the loop, defined by...
  11. [SOLVED] Re: Absolute Beginner Here, should be an easy question for anyone really.

    By check, I just mean we can assume all is well so far, as far as the program advancing to the next place you intended for it to advance to.
  12. [SOLVED] Re: Absolute Beginner Here, should be an easy question for anyone really.

    Perhaps better than telling you what is wrong, how about helping you figure out what is wrong. Next time you will be better prepared to find and fix. Lets see if I can steer you in a positive...
Results 1 to 12 of 12