Ejemplo n.º 1
0
        public static void Main(string[] args)
        {
            var customerTypes = new List <string>
            {
                "Normal", "No Tax", "Holiday"
            };

            var customers = new List <ICustomer>();

            foreach (var customerType in customerTypes)
            {
                customers.Add(SimpleFactory.CreateRetailCustomer(customerType));
            }

            foreach (var customer in customers)
            {
                Console.WriteLine(customer.TotalBill());
            }

            Console.ReadLine();
        }
Ejemplo n.º 2
0
 public Inventory()
 {
     Customer = SimpleFactory.CreateRetailCustomer("Gold");
     Customer.TotalBill();
 }