Exemple #1
0
        private double getToppingPrice(Topping type)
        {
            switch (type)
            {
            case Topping.formaggi: return(2);

            case Topping.stagioni: return(1.5);

            case Topping.pepperoni: return(1);

            case Topping.chicken: return(1);

            case Topping.margherita: return(0);

            default: return(0);
            }
        }
Exemple #2
0
 public Pizza(Crust crust, Topping topping)
 {
     this.crust   = crust;
     this.topping = topping;
 }