Esempio n. 1
0
        public void buy(AbstractProduct product)
        {
            orders.Add(product);

            if (product.NewArrival && product.getProductType() == ProductType.BEVERAGE)
            {
                discount = CondimentDiscount.ENABLED;
            }

            totalPrice += product.getPrice(discount);
        }
Esempio n. 2
0
        public void buy(AbstractProduct product)
        {
            orders.Add(product);

            if (product.NewArrival && product.getProductType() == ProductType.BEVERAGE)
            {
                discount = CondimentDiscount.ENABLED;
            }

            totalPrice += product.getPrice(discount);
        }