Esempio n. 1
0
        public Client()
        {
            CarFactory factory   = new FactoryRayHorses();
            SportCar   sportCar  = factory.CreateSportCar();
            NormalCar  normalCar = factory.CreateNormalCar();

            sportCar.ShowSportCar();
            normalCar.ShowNormalCar();

            factory   = new FactoryThunderHorses();
            sportCar  = factory.CreateSportCar();
            normalCar = factory.CreateNormalCar();

            sportCar.ShowSportCar();
            normalCar.ShowNormalCar();
        }