@@ -0,0 +1,1920 @@
+/**%0A * Steven Ward%0A * Inventory.java %7C Drink Machine Project%0A *%0A * This file contains the definition for the generic class, Inventory, which is described below.%0A *%0A * Due Date: December 4, 2016%0A *%0A */%0A%0Aimport java.util.Arrays;%0A%0A/**%0A * TODO: CLASS-LEVEL DOCUMENTATION FOR INVENTORY CLASS!%0A *       JAVADOC TAGS%0A */%0A%0Apublic class Inventory%3CProduct extends Enum%3CProduct%3E%3E %7B%0A  private Class%3CProduct%3E productType;%0A  //private final Product%5B%5D products;%0A  private int%5B%5D currentStock;%0A%0A%0A  public int nLeftInStock(int productNo) %7B%0A    return this.currentStock%5BproductNo%5D;%0A  %7D%0A%0A%0A  public int nLeftInStock(Product product) %7B%0A    int productNo = 0;%0A    for (Product p : this.productType.getEnumConstants()) %7B%0A      if (product == p) %7B break; %7D%0A      productNo++;%0A    %7D%0A    return this.currentStock%5BproductNo%5D;%0A  %7D%0A%0A%0A  public boolean soldOutOf(int productNo) %7B%0A    return !(nLeftInStock(productNo) %3E 0);%0A  %7D%0A%0A%0A  public boolean soldOutOf(Product product) %7B%0A    return !(nLeftInStock(product) %3E 0);%0A  %7D%0A%0A%0A  public boolean soldOut( ) %7B%0A    for (int i : this.currentStock) %7B%0A      if (i %3E 0) %7B return false; %7D%0A    %7D%0A    return true;%0A  %7D%0A%0A%0A  public Inventory(final Class%3CProduct%3E productType, final int%5B%5D initStock) %7B%0A    this.productType = productType;%0A    Product%5B%5D products = this.productType.getEnumConstants();%0A    this.currentStock = new int%5Bproducts.length%5D;%0A    if (products.length %3E initStock.length) %7B%0A      for (int i = 0; i %3C products.length; i++) %7B%0A        currentStock%5Bi%5D = i %3C initStock.length ? initStock%5Bi%5D : 0;%0A      %7D%0A    %7D%0A    else %7B%0A      for (int i = 0; i %3C products.length; i++) %7B%0A        currentStock%5Bi%5D = initStock%5Bi%5D;%0A      %7D%0A    %7D%0A  %7D%0A%0A%0A  public Inventory(final Class%3CProduct%3E productType, int uniform_stock) %7B%0A    this.productType = productType;%0A    Product%5B%5D products = this.productType.getEnumConstants();%0A    this.currentStock = new int%5Bproducts.length%5D;%0A    Arrays.fill(currentStock, uniform_stock);%0A  %7D%0A%7D%0A

Add 'Alt.WardDrinkMachine/' directory and 'src/Inventory.java' within it