Search:

Type: Posts; User: newbie

Search: Search took 0.11 seconds.

  1. Replies
    24
    Views
    2,983

    Re: Why isn't this code working?

    Just rework your logic.

    Plan what you want to do, write down on paper how you would do it in the real world, then convert that logic into Java.
  2. Replies
    24
    Views
    2,983

    Re: Why isn't this code working?

    Sorry, but that is some weird coding practice.

    Anyway, the reason it always sums up to 45 is because for every justSold() and getNumSold() call, you increment your variables by 1.
    If you count...
Results 1 to 2 of 2