public int GetNumberOfEmployees()
{
int instructors = FlightSchools.Sum(f => f.NumberOfInstructors);
int cockpitCrew = Pilots.Count;
int cabinCrew =
Routes.Where(r => r.Type == Route.RouteType.Passenger)
.Sum(r => ((PassengerRoute) r).GetTotalCabinCrew());
int serviceCrew =
Airports.SelectMany(a => a.GetCurrentAirportFacilities(this))
.Where(a => a.EmployeeType == AirportFacility.EmployeeTypes.Support)
.Sum(a => a.NumberOfEmployees);
int maintenanceCrew =
Airports.SelectMany(a => a.GetCurrentAirportFacilities(this))
.Where(a => a.EmployeeType == AirportFacility.EmployeeTypes.Maintenance)
.Sum(a => a.NumberOfEmployees);
return cockpitCrew + cabinCrew + serviceCrew + maintenanceCrew + instructors;
}