Beispiel #1
0
		public Flight(
            string flightNumber, Airport departureAirport, Airport destinationAirport, Aircraft aircraft, DateTime departureTime)
            : this (Transient, flightNumber, departureAirport, destinationAirport, aircraft, departureTime, new Cabin[] {})
		{
            foreach (Cabin cabin in aircraft.Cabins)
            {
                this.cabins.Add(cabin.CabinClass, new Cabin(cabin));
            }
			CalculateSeatPlan();
        }
Beispiel #2
0
 public Flight(
     long id, string flightNumber, Airport departureAirport, Airport destinationAirport, Aircraft aircraft, DateTime departureTime, params Cabin[] cabins) : base(id)
 {
     this.flightNumber = flightNumber;
     this.departureAirport = departureAirport;
     this.destinationAirport = destinationAirport;
     this.aircraft = aircraft;
     this.departureTime = departureTime;
     foreach (Cabin cabin in cabins)
     {
         this.cabins.Add(cabin.CabinClass, cabin);
     }
     CalculateSeatPlan();
 }