コード例 #1
0
        public override void CreateVehicule(Vehicule _vehicule)
        {
            Boat _boat = (Boat)_vehicule;

            _boat.Start();
            _boat.Navigate();
            _boat.ThrowAnchor();
            _boat.Stop();
            FactoryVehicules.Add(_boat);
        }
コード例 #2
0
        public override void CreateVehicule(Vehicule _vehicule)
        {
            Plane _plane = (Plane)_vehicule;

            _plane.Start();
            _plane.Fly();
            _plane.Land();
            _plane.Stop();
            FactoryVehicules.Add(_plane);
        }
コード例 #3
0
        public override void CreateVehicule(Vehicule _vehicule)
        {
            Car _car = (Car)_vehicule;

            _car.Start();
            _car.Drive();
            _car.Brake();
            _car.Stop();
            FactoryVehicules.Add(_car);
        }
コード例 #4
0
        public override void CreateVehicule()
        {
            Random _randomSerial = new Random();
            int    _serial       = _randomSerial.Next(1000, 9999);
            Boat   _boat         = new Boat(_serial, VehiculeColor.Black, 1, FactoryName, true);

            FactoryVehicules.Add(_boat);
            _boat.Start();
            _boat.Navigate();
            _boat.ThrowAnchor();
            _boat.Stop();
            FactoryVehicules.Add(_boat);
        }