Пример #1
0
        static void Main(string[] args)
        {
            IAirTraficController tower  = new ConcreteTower();
            AirCraft             Boeing = new Boeing("Boeing747", tower);
            AirCraft             Foker  = new Foker("Foker323", tower);
            AirCraft             AirBus = new AirBus("A380", tower);

            Boeing.Altitude = 34000;
            Foker.Altitude  = 34500;
        }
Пример #2
0
        private static void Main(string[] args)
        {
            IAirTrafficControl tower = new Tower();

            Aircraft flight1 = new Airbus("AC159", tower);
            Aircraft flight2 = new Boeing("WS203", tower);
            Aircraft flight3 = new Fokker("AC602", tower);

            flight1.Altitude += 1000;
            Console.ReadKey();
        }
Пример #3
0
        static void Main(string[] args)
        {
            IAirTrafficController airTrafficController = new AirTrafficController();

            Plane boeing   = new Boeing(airTrafficController);
            Plane airbus   = new Airbus(airTrafficController);
            Plane superJet = new SuperJet(airTrafficController);

            boeing.SendMessage("Landing request");

            airbus.SendMessage("Landing request");
        }
Пример #4
0
        static void Main(string[] args)
        {
            IAirControl airCommand = new AirControl();

            Aircraft boeing1 = new Boeing("BOING-1", airCommand);
            Aircraft boeing2 = new Boeing("BOING-2", airCommand);
            Aircraft airBus1 = new AirBus("AIR-1", airCommand);

            Console.WriteLine("BOING-1 takes off");
            Console.WriteLine("BOING-2 takes off");
            Console.WriteLine("AIR-1 takes off");


            boeing1.Altitude = 1000;
            boeing2.Altitude = 1200;
            airBus1.Altitude = 2200;

            Console.ReadLine();
        }