title: How to implement a Multi Class Application
body: <p>This is the zoo manager coding:</p>
  
  <pre><code>public class ZooManager {
  public void feedAnimals(Animals a, Food[] arrayFood) {
      Food temp = null;
      for (int i = 0; i &lt; arrayFood.length; i++) {
          if (arrayFood[i].getFoodName().equals(a.getTypeOfFood())) {
              arrayFood[i].setAmount(arrayFood[i].getAmount() - 1);
              System.out.print("Animal is fed.");
          }
      }
      System.out.print(temp);
  }
  public void isFoodEmpty(Food[] arrayFood) {
      for (int i = 0; i &lt; arrayFood.length; i++) {
          if (arrayFood[i] == null) {
              System.out.print("True");
          } else {
              System.out.print("False");
        }
      }
    }
  }
  </code></pre>
  
  <p>This is the code for the main application:</p>
  
  <pre><code>import java.util.Scanner;
  public class ZooApp {
  public static void main(String[] args) {
      Scanner in = new Scanner(System.in);
      Animals[] a = new Animals[4];
      for (int i = 0; i &lt; 4; i++) {
          System.out.print("Enter the animal name: ");
          String an = in.nextLine();
          System.out.print("What type of food do they eat: ");
          String tof = in.nextLine();
          a[i] = new Animals(an, tof);
      }
      Food[] b = new Food[3];
      for (int i = 0; i &lt; 3; i++) {
          System.out.print("Enter the type of food: ");
          String f = in.nextLine();
          System.out.print("Enter the amount: ");
          int am = in.nextInt();in.nextInt();
          b[i] = new Food(f, am);
      }
      ZooManager z= new ZooManager();
      System.out.print(z.feedAnimals(a[i], b));
      System.out.print(z.isFoodEmpty(b[i]));
    }
  }
  </code></pre>
  
  <p>I have an error at the two final out prints on the main application. The first one is that "the void type is not allowed there." and "variable i can not be found." The second out put says that "isFoodEmpty cannot be given to the type: Food, required: Food[]." Thank you for any advice or help.</p>