public double CalculateTotalCost(int p) { double total = 0; Size size = pizzas[p].Size; total += size.GetSizeCost(); Topping topping = pizzas[p].Topping; total += 1 * topping.GetToppingCount(); Crust crust = pizzas[p].Crust; total += crust.GetCrustCost(); return(total); }
public Pizza(Topping topping, Size size, Crust crust) { Topping = topping; Size = size; Crust = crust; }