public bool ApplyDiscount(ShoppingCart shoppingCart) { if (shoppingCart.TotalAmount > MinimumAmount) { DiscountStrategy.ApplyDiscount(shoppingCart, DiscountQuantity); return(true); } return(false); }
public bool ApplyDiscount(ShoppingCart shoppingCart) { uint productQuantity = shoppingCart.GetProductQuantityOfCategory(Category); if (productQuantity > MinimumItems) { DiscountStrategy.ApplyDiscount(shoppingCart, DiscountQuantity); return(true); } return(false); }