Example #1
0
        public Truck(string i_LicensePlateNumber)
        {
            Engine             = new GasEngine(eGasType.Soler, 120);
            LicensePlateNumber = i_LicensePlateNumber;

            WheelCount = 16;
            Wheels     = Wheel.CreateWheelsArray(26, WheelCount);
        }
Example #2
0
        public Car(eTypeOfEngine i_TypeOfEngine, string i_LicensePlateNumber)
        {
            Engine engine = null;

            switch (i_TypeOfEngine)
            {
            case eTypeOfEngine.Gas:
                engine = new GasEngine(eGasType.Octan95, 45);
                break;

            case eTypeOfEngine.Electric:
                engine = new ElectricEngine(3.2f);
                break;
            }

            Engine             = engine;
            LicensePlateNumber = i_LicensePlateNumber;
            WheelCount         = 4;
            Wheels             = Wheel.CreateWheelsArray(32, WheelCount);
        }