Example #1
0
 public string Land(AerialVehicle a)
 {
     if (Vehicles.Count() < MaxVehicles)
     {
         a.FlyDown(a.CurrentAltitude);
         Vehicles.Add(a);
         return(string.Format($"{a.GetType()} has landed."));
     }
     return(string.Format($"Airport {AirportCode} is full."));
 }
Example #2
0
 public string TakeOff(AerialVehicle a)
 {
     a.TakeOff();
     Vehicles.RemoveAt(-1);
     return(string.Format($"{this.GetType()} has taken off."));
 }