Search:

Type: Posts; User: Junky

Search: Search took 0.11 seconds.

  1. Replies
    6
    Views
    4,928

    Re: Hot Dog Stand Code

    You should be able to answer that question. Why is is static?

    --- Update ---

    Ahhh!

    You have 2 variables:
    totalsold which I assume is for all stands then that does need to be static....
  2. Replies
    6
    Views
    4,928

    Re: Hot Dog Stand Code

    If you were blindfolded and it was your job to count how many hotdogs I sold and I called out "justSold" every time I sold a hotdog how would you keep track? Would you require me to give your a...
  3. Replies
    6
    Views
    4,928

    Re: Hot Dog Stand Code

    public int justSold(int sold) {
    return sold++; }

    You are increasing the parameter value and not the instance variable that tracks how many hotdogs have been sold. Other problems:

    Why are you...
Results 1 to 3 of 3