Esempio n. 1
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");
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            AirTrafficController controlCenter = new AirTrafficController();
            Flight boeing101  = new Flight(controlCenter);
            Runway mainRunway = new Runway(controlCenter);

            controlCenter.registerFlight(boeing101);
            controlCenter.registerRunway(mainRunway);
            boeing101.getReady();
            mainRunway.land();
            boeing101.land();
            Console.ReadLine();
        }