Example #1
0
        public void CreateCar(CarFactory carFactory)
        {
            Wheels = new List <IWheel>();
            for (int i = 1; i <= 4; i++)
            {
                Wheels.Add(carFactory.CreateWheel());
            }

            Windshield = carFactory.CreateWindshield();
            Engine     = carFactory.CreateEngine();
        }