import java.util.ArrayList; public class GTRestaurantC { private ArrayList stock; float cost; float revenue; public GTRestaurantC() { stock = new ArrayList<>(); cost = 0.0f; revenue = 0.0f; } public void addItem(MenuItemIntf mi) { stock.add(mi); cost += mi.getCount()*mi.getCost(); } public MenuItemIntf findItem(int id) { for (int i=0; i= count) { mi.changeCount(-1*count); if (mi.getCount()==0) stock.remove(mi); revenue += count*mi.getPrice(); return true; } return false; } public boolean doOrder(Trio trio) { Drink d=null; MainC m = null; Salad s = null; for (int i=1; i<=3; i++) { MenuItemIntf mf = findItem(trio.getPart(i)); if (mf instanceof Salad) s=(Salad)mf; if (mf instanceof MainC) m = (MainC)mf; if (mf instanceof Drink) d=(Drink)mf; } if (s==null || d==null || m==null) { return false; } if ((s.getCount()