Exemple #1
0
 public Flight(ITransport transport)
 {
     _transport = transport;
     _seatTypes = new Dictionary<SeatType, decimal>();
     _freeSeats = new Dictionary<SeatType, int>();
     foreach (SeatType seatType in _transport.GeSeatTypes())
     {
         _seatTypes.Add(seatType, 0);
         _freeSeats.Add(seatType, _transport.GetMaxSeats(seatType));
     }
 }