Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            AbstractCustomer customer1 = CustomerFactory.GetCustomer("Rob");
            AbstractCustomer customer2 = CustomerFactory.GetCustomer("Alice");

            Console.WriteLine(customer1.GetName());
            Console.WriteLine(customer2.GetName());
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            AbstractCustomer customer1 = CustomerFactory.GetCustomer("Rob");
            AbstractCustomer customer2 = CustomerFactory.GetCustomer("Bob");
            AbstractCustomer customer3 = CustomerFactory.GetCustomer("Julie");
            AbstractCustomer customer4 = CustomerFactory.GetCustomer("Laura");

            Console.WriteLine("Customers");
            Console.WriteLine(customer1.Name);
            Console.WriteLine(customer2.Name);
            Console.WriteLine(customer3.Name);
            Console.WriteLine(customer4.Name);
        }