Beispiel #1
0
 public Flight(Aircraft aircraft, Schedule schedule, int flightNumber, decimal priceMultiplier)
 {
     Manifest = new List<Passenger>();
     this.Schedule = schedule;
     this.FlightNumber = flightNumber;
     this.Aircraft = aircraft;
     this.PriceMultiplier = priceMultiplier;
     this.ListOfSeatsRows = PopulateSeatList();
 }
Beispiel #2
0
 public Flight()
 {
     Schedule = new Schedule();
     StartTime = new DateTime();
     EndTime = new DateTime();
     Manifest = new List<Passenger>();
     Aircraft = new Aircraft();
     ListOfSeatsRows = new List<SeatRow>();
 }
Beispiel #3
0
 public void AddToSchedule(Schedule scheduleToAdd)
 {
     ScheduleList.Add(scheduleToAdd);
 }
Beispiel #4
0
        public void CreateFlight(Aircraft aircraft, Schedule schedule, int flightNumber)
        {
            int distance = LocationHelper.FindDistanceBetweenLocations(schedule.Origin, schedule.Destination);
            ListOfFlights.Add(new Flight(aircraft, schedule, flightNumber, .4m*distance));

        }