コード例 #1
0
ファイル: Program.cs プロジェクト: Rediska404/22.05.21
        static void Main(string[] args)
        {
            Transport newTransport = new Transport("", "", "");

            newTransport.Color = "";



            Car NewCar = new Car("BMW", "Black", "М5");

            NewCar.StartCar(true);
            NewCar.SignalingCar(false);
            Bus NewBus = new Bus("ПАЗ", "White", "21-36");

            NewBus.DoorBus(false);
            NewBus.BusStart(true);
            Plane NewPlane = new Plane("AirBus", "White", "A-310");

            NewPlane.Start(false);
            NewPlane.Chassis(true);
            NewPlane.Color = "";
            Helicopter NewHelecopter = new Helicopter("Bell", "Blue", "407");

            NewHelecopter.Start(false);
            NewHelecopter.Door(true);
            Train NewTrain = new Train("JR-Maglev", "White", "NotNull");

            NewTrain.Start(true);
            NewTrain.Door(false);
            Console.ReadKey();
        }
コード例 #2
0
        static void Main(string[] args)
        {
            // true - заведен/открыто, false - заглушен/закрыто.
            Car NewCar = new Car("BMW", "Black", "М5");

            NewCar.EngineOn(true);
            NewCar.SignalingCar(false);
            Bus NewBus = new Bus("ПАЗ", "White", "21-36");

            NewBus.DoorBus(false);
            NewBus.EngineOn(true);
            Plane NewPlane = new Plane("AirBus", "White", "A-310");

            NewPlane.EngineOff(false);
            NewPlane.Chassis(true);
            Helicopter NewHelecopter = new Helicopter("Bell", "Blue", "407");

            NewHelecopter.EngineOff(false);
            NewHelecopter.Door(true);
            Train NewTrain = new Train("JR-Maglev", "White", "NotNull");

            NewTrain.EngineOn(true);
            NewTrain.Door(false);
            EngineOffOn(NewCar, "Mашина");
            EngineOffOn(NewBus, "Aвтобус");
            EngineOffOn(NewPlane, "Cамолет");
            EngineOffOn(NewHelecopter, "Bертолет");
            EngineOffOn(NewTrain, "Поезд");

            Console.ReadKey();
        }