public CoffeeIF makeCoffee(string coffee, List <string> condimentList)
        {
            if (condimentList.Count == 0)
            {
                return(cif);
            }
            else
            {
                cif = (CoffeeIF)Activator.CreateInstance(Type.GetType("421FinalProject.Coffee" + "." + coffee));

                for (int i = 0; i < condimentList.Count; i++)
                {
                    CondimentFactory cf = new CondimentFactory();

                    cf.getCondiment(condimentList[i]);
                    cif = new CoffeeWrapper(cif, cf.getCondiment(condimentList[i]));
                }
                return(cif);
            }
        }
Example #2
0
 public void addCondiment(CoffeeCondimentAC cac)
 {
     cif = new CoffeeWrapper(cif, cac);
 }
 public double computePrice(CoffeeIF cif)
 {
     return(cif.getCondimentPrice() + cif.getMenuPrice());
 }
Example #4
0
 public CoffeeWrapper(CoffeeIF cif, CoffeeCondimentAC cac)
 {
     this.cif = cif;
     this.cac = cac;
 }