Beispiel #1
0
        private static void Billing(IPercentageDiscount percentageDiscount)
        {
            var billingService = new BillingService(percentageDiscount, new BillDiscount());

            billingService.AddItem(new OtherItem {
                Name = "Laptop", Price = 50000
            });
            billingService.AddItem(new OtherItem {
                Name = "Mobile", Price = 20000
            });
            billingService.AddItem(new GroceryItem {
                Name = "Rice", Price = 1000
            });
            Console.WriteLine(billingService.PrintBill());
        }