Exemplo n.º 1
0
        static void Main(string[] args)
        {
            TaffyFactory kandyKorner = new TaffyFactory();

            kandyKorner.HireEmployee(new Confectioner()
            {
                FirstName = "Joe",
                LastName  = "Smith"
            });


            SteelFactory erieSteel = new SteelFactory();

            erieSteel.HireEmployee(new SteelWorker()
            {
                FirstName = "Anil",
                LastName  = "Ambani"
            });


            InsulinFactory johnsonChemical = new InsulinFactory();

            johnsonChemical.HireEmployee(new LabTechnician()
            {
                FirstName = "Peter",
                LastName  = "C"
            });


            NuggetFactory flemingFoods = new NuggetFactory();

            flemingFoods.HireEmployee(new FoodProcessor()
            {
                FirstName = "Brad",
                LastName  = "Chef"
            });


            CarFactory acmeAutos = new CarFactory();

            acmeAutos.HireEmployee(new AutoWorker()
            {
                FirstName = "Lynn",
                LastName  = "Ford"
            });
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            TaffyFactory kandyKorner = new TaffyFactory();

            kandyKorner.HireEmployee();


            SteelFactory erieSteel = new SteelFactory();


            InsulinFactory johnsonChemical = new InsulinFactory();


            NuggetFactory flemingFoods = new NuggetFactory();


            CarFactory acmeAutos = new CarFactory();
        }
Exemplo n.º 3
0
        static void Main(string[] args)
        {
            TaffyFactory kandyKorner = new TaffyFactory();

            kandyKorner.HireEmployee(new Confectioner {
                FirstName = "Susan",
                LastName  = "Chung"
            });


            SteelFactory erieSteel = new SteelFactory();

            erieSteel.HireEmployee(new SteelWorker {
                FirstName = "Stewart",
                LastName  = "Baut"
            });


            InsulinFactory johnsonChemical = new InsulinFactory();

            johnsonChemical.HireEmployee(new LabTechnician {
                FirstName = "Michael",
                LastName  = "Bolt-on"
            });

            johnsonChemical.employees.ForEach(e =>
                                              Console.WriteLine($"{e.FirstName} {e.LastName}"));


            NuggetFactory flemingFoods = new NuggetFactory();

            flemingFoods.HireEmployee(new FoodProcessor {
                FirstName = "Ted",
                LastName  = "Nuget"
            });


            CarFactory acmeAutos = new CarFactory();

            acmeAutos.HireEmployee(new AutoWorker {
                FirstName = "Chevy",
                LastName  = "Ford"
            });
        }