/**
 * Steven Ward
 * MachineController.java | Drink Machine Project
 *
 * This file contains the definition of the MachineController class, which is described below.
 *
 * Due Date: December 4, 2016
 *
 */

public class MachineController {

}

@@ -205,40 +205,1302 @@
 */%0A%0A
-public class MachineController %7B
+import java.text.NumberFormat;%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0Aimport java.util.Locale;%0A%0Apublic class MachineController %7B%0A  public static final double DRINK_PRICE = 0.75;%0A  public static final NumberFormat currency_format = NumberFormat.getCurrencyInstance(Locale.US);%0A%0A  private int%5B%5D inventory = %7B 10, 10, 10 %7D;%0A  private List%3CCoin%3E paid = new ArrayList%3C%3E();%0A  private boolean canPurchase = false;%0A%0A  enum Coin %7B%0A    PENNY(0.01), NICKEL(0.05), DIME(0.10), QUARTER(0.25), HALF_DOLLAR(0.50), DOLLAR(1.00);%0A    Coin(double val) %7B this.value = val; %7D%0A    public double value( ) %7B return this.value; %7D%0A    private final double value;%0A  %7D%0A%0A  enum Drinks %7B%0A    COLA(0), LEMON_LIME(1), WATER(2);%0A    Drinks(int i) %7B this.i = i; %7D%0A    public int toInt( ) %7B return this.i; %7D%0A    private final int i;%0A  %7D%0A%0A  public boolean canPurchase( ) %7B return this.canPurchase; %7D%0A%0A  public double getAmountPaid( ) %7B%0A    double amountPaid = 0.0;%0A    for (Coin coin : this.paid) %7B%0A      amountPaid += coin.value();%0A    %7D%0A    return amountPaid;%0A  %7D%0A%0A  public boolean insertCoin(final Coin coin) %7B%0A    if (this.canPurchase) %7B%0A      return false;%0A    %7D%0A    else %7B%0A      this.paid.add(coin);%0A      this.canPurchase = this.getAmountPaid() %3E= DRINK_PRICE ? true : canPurchase;%0A      return true;%0A    %7D%0A  %7D
 %0A%0A%7D%0A

Update MachineController class src file