예제 #1
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();
        }
예제 #2
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");
        }