public string TakeOff(AerialVehicle a) { string ret; a.StartEngine(); a.TakeOff(); if (a.IsFlying) { ret = $"{a.ToString()} took off successfully."; Vehicles.Remove(a); } else { ret = $"{a.ToString()} could not take off."; } return(ret); }
public string Land(AerialVehicle a) { a.CurrentAltitude = 0; a.StopEngine(); a.IsFlying = false; Vehicles.Add(a); return($"{a.ToString()} has landed"); }