Open Gregrs400 opened 1 month ago
This also ties into passenger generation, where at maximum the number of passengers that should be generated for each flight should match the number of seats in the plane. There should be a way to reserve seats via the Flight.
My current idea is each airline's planes' seat layouts each being represented by a 2d array, with different lengths to indicate different numbers of seats in each row. Need to test this out to be certain, but based on preliminary research, seems possible.
The array would hold Passengers, who would reserve those seats after being generated. Passenger generation would occur based on choosing a random number with the upper bound being the number of open seats yet to be reserved.
Going to implement a Seat class to differentiate between different classes of plane seats, as well as seats off planes, such as gate seats.
The seat map array would be composed of these Seat objects.
At the moment, seats are reserved for Planes, which means passengers cannot reserve seats for flights that utilize a plane that is currently assigned to a flight in front of it.