title: average method won't run correctly
body: <p>This is my average method that I am trying to obtain some values from.</p>
  
  <p>I'm not sure what is wrong with my code, but it won't compile correctly. </p>
  
  <p>I am actually not getting any output from it.</p>
  
  <p>I also need to know hoe to call this method from the main method.  Thanks!</p>
  
  <pre><code>public String averageFood()
      {
  String averageStuff = "";
          double avg = 0;
          double num1 = 0;
          double num2 = 0;
          for (int i = 0; i &lt; numGerbils; i++)
          {
              averageStuff = averageStuff + gerbilArray[i].getID();
              averageStuff = averageStuff + " (";
              averageStuff = averageStuff + gerbilArray[i].getName();
              averageStuff = averageStuff + ") ";
              for (int k = 0; k &lt; foodnum; k++)
              {
                  num1 = num1 + foodArray[k].getamtOfFood();
                  num2 = num2 + gerbilArray[i].getGerbFood()[k].getamtOfFood();
              }
              avg = 100*(num2/num1);
              avg = Math.round(avg);
              averageStuff = averageStuff + Double.toString(avg);
              averageStuff = averageStuff + "%\n";
          }
          return averageStuff;
      }
  </code></pre>
  
  <p>public class Gerbil {</p>
  
  <pre><code>String ID;
  String name;
  //private int[] consumption;
  boolean bite; 
  boolean escape;
  Food[] gerbFood;
  int sum;
  
  //public Gerbil (int numOfFood) {
  
      //consumption = new int[numOfFood];
  //}
  
  public Gerbil(String ID, String name, boolean bite, boolean escape, Food[] gerbFood)
  {
  
      this.ID = ID;
      this.name = name;
      this.bite = bite;
      this.escape = escape;
      this.gerbFood = gerbFood;
  
  }
  
  public String getID() {
      return ID;
  
  }
  
  
  //public void setID(String Id) {
      //Id = ID;
  //}
  
  public String getName () {
      return name;
  }
  
  public Food[] getGerbFood() {
      return gerbFood;
  }
  
  //public void setName (String name) {
      //this.name = name;
  //}
  
  //public int[] getConsumption () {
      //return consumption;
  //}
  public String getBite() {
      if(bite == true) {
          return "will bite";
      }
      else {
          return "will not bite";
      }
  
  }
  //public void setBite(boolean bite) {
      //this.bite = bite;
  //}
  
  public String getEscape() {
      if(escape == true) {
      return "will escape";
      }
      else {
          return "won't escape";
      }
  }
  </code></pre>
  
  <p>public class Food {</p>
  
  <pre><code>String nameOfFood;
  String colorOfFood;
  int amtOfFood;
  
  public Food (String nameOfFood, String colorOfFood, int amtOfFood)
  {
      this.nameOfFood = nameOfFood;
      this.colorOfFood = colorOfFood;
      this.amtOfFood = amtOfFood;
  }
  
  public String getnameOfFood()
  {
      return nameOfFood;
  }
  
  public String getcolorOfFood()
  {
      return colorOfFood;
  }
  
  public int getamtOfFood()
      {
      return amtOfFood;
      }
  }
  </code></pre>