Exemplo n.º 1
0
 public bool ApplyDiscount(ShoppingCart shoppingCart)
 {
     if (shoppingCart.TotalAmount > MinimumAmount)
     {
         DiscountStrategy.ApplyDiscount(shoppingCart, DiscountQuantity);
         return(true);
     }
     return(false);
 }
Exemplo n.º 2
0
        public bool ApplyDiscount(ShoppingCart shoppingCart)
        {
            uint productQuantity = shoppingCart.GetProductQuantityOfCategory(Category);

            if (productQuantity > MinimumItems)
            {
                DiscountStrategy.ApplyDiscount(shoppingCart, DiscountQuantity);
                return(true);
            }
            return(false);
        }