Exemple #1
0
        /// <summary>
        /// Ask the aircraft factory to create a rescue helicopter
        /// </summary>
        /// <param name="airportID"></param>
        /// <param name="name"></param>
        /// <param name="speed"></param>
        /// <param name="maintenance"></param>
        public void AddRescueHelicopter(int airportID, string name, int speed, int maintenance)
        {
            aircraftFactory = AircraftFactory.GetAircraftFactory();
            Aircraft aircraft = AircraftFactory.CreateRescueHelicopter(name, speed, maintenance);

            aircraftNotifier(aircraft.ToString());
            Airports[airportID].AddAircraft(aircraft);
        }
Exemple #2
0
        /// <summary>
        /// Ask the aircraft factory to create a observer plane
        /// </summary>
        /// <param name="airportID"></param>
        /// <param name="name"></param>
        /// <param name="speed"></param>
        /// <param name="maintenance"></param>
        public void AddObserverPlane(int airportID, string name, int speed, int maintenance)
        {
            aircraftFactory = AircraftFactory.GetAircraftFactory();
            Aircraft aircraft = AircraftFactory.CreateObserverPlane(name, speed, maintenance);

            aircraftNotifier(aircraft.ToString());
            Airports[airportID].AddAircraft(aircraft);
        }
Exemple #3
0
        /// <summary>
        /// Ask the aircraft factory to create a passenger plane
        /// </summary>
        /// <param name="airportID"></param>
        /// <param name="name"></param>
        /// <param name="speed"></param>
        /// <param name="maintenance"></param>
        /// <param name="loadingTime"></param>
        /// <param name="unLoadingTime"></param>
        /// <param name="capacity"></param>
        public void AddPassengerPlane(int airportID, string name, int speed, int maintenance, int loadingTime, int unLoadingTime, int capacity)
        {
            aircraftFactory = AircraftFactory.GetAircraftFactory();
            Aircraft aircraft = AircraftFactory.CreatePassengerPlane(name, speed, maintenance, loadingTime, unLoadingTime, capacity);

            aircraftNotifier(aircraft.ToString());
            Airports[airportID].AddAircraft(aircraft);
        }
Exemple #4
0
        /// <summary>
        /// Ask the aircraft factory to create a water bomber
        /// </summary>
        /// <param name="airportID"></param>
        /// <param name="name"></param>
        /// <param name="speed"></param>
        /// <param name="maintenance"></param>
        /// <param name="droppingTime"></param>
        /// <param name="waterCapacity"></param>
        public void AddWaterBomber(int airportID, string name, int speed, int maintenance, int droppingTime, int waterCapacity)
        {
            aircraftFactory = AircraftFactory.GetAircraftFactory();
            Aircraft aircraft = AircraftFactory.CreateWaterBomber(name, speed, maintenance, droppingTime, waterCapacity);

            aircraftNotifier(aircraft.ToString());
            Airports[airportID].AddAircraft(aircraft);
        }
Exemple #5
0
        /// <summary>
        /// Ask the aircraft factory to create a cargo plane
        /// </summary>
        /// <param name="airportID"></param>
        /// <param name="name"></param>
        /// <param name="speed"></param>
        /// <param name="maintenance"></param>
        /// <param name="loadingTime"></param>
        /// <param name="unLoadingTime"></param>
        /// <param name="weight"></param>
        public void AddCargoPlane(int airportID, string name, int speed, int maintenance, int loadingTime, int unLoadingTime, int weight)
        {
            aircraftFactory = AircraftFactory.GetAircraftFactory();
            Aircraft aircraft = AircraftFactory.CreateCargoPlane(name, speed, maintenance, loadingTime, unLoadingTime, weight);

            aircraftNotifier(aircraft.ToString());
            Airports[airportID].AddAircraft(aircraft);
        }