Search:

Type: Posts; User: aussiemcgr

Search: Search took 0.11 seconds.

  1. Replies
    7
    Views
    1,356

    Re: Homework Help Java Beginner

    You know, since you are setting caloriesOfHighest to 0 initially, and we can assume you will never have an item with negative calories, your first if statement would actually cover the situation...
  2. Replies
    7
    Views
    1,356

    Re: Homework Help Java Beginner

    Ok, very good. Now, let's look at your requirements for this method:

    So our goals for this method are:
    1. Add calories to the totalCalories instance variable
    2. Increment the count of items...
  3. Replies
    7
    Views
    1,356

    Re: Homework Help Java Beginner

    Ok, well first of all, take out the code in your addToCounter() method where you are setting the parameter values:

    calories = 900;
    // and
    itemName = "Subway BMT Italian Sandwich";
    // and ...
  4. Replies
    7
    Views
    1,356

    Re: Homework Help Java Beginner

    I'm confused. What is wrong with the addToCounter() method? I am noticing that you are pretty much ignoring the values of the parameters you pass into the method (since you are setting their values...
Results 1 to 4 of 4