Example #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;
        }
Example #2
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();
        }