Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Program
- {
- static void Main(string[] args)
- {
- var purchaseOrder = new PurchaseOrder("Solution", new DiscountService(), 1000);
- Print(purchaseOrder);
- purchaseOrder = new PurchaseOrder("Solution", new DiscountService(), 2000);
- Print(purchaseOrder);
- purchaseOrder = new PurchaseOrder("Solution", new DiscountService(), 2400);
- Print(purchaseOrder);
- purchaseOrder = new PurchaseOrder("Solution", new DiscountService(), 3000);
- Print(purchaseOrder);
- }
- public static void Print(PurchaseOrder purchaseOrder)
- {
- var result = purchaseOrder.CalculateOrderPriceWithDiscount();
- Console.WriteLine(" " + purchaseOrder.Title + " - " + " Value: " + purchaseOrder.Value + " OrderPrice: " + result);
- }
- }
Add Comment
Please, Sign In to add comment