Gregrs400 / AirportSim

Object-Oriented Representation of Airports and the systems within. Extension of a final project for a class.
1 stars 0 forks source link

No seat reservation system for future flights #5

Open Gregrs400 opened 1 month ago

Gregrs400 commented 1 month ago

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.

Gregrs400 commented 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.

Gregrs400 commented 1 month ago

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.

Gregrs400 commented 1 month ago

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.

Gregrs400 commented 1 month ago

Going to implement a Seat class to differentiate between different classes of plane seats, as well as seats off planes, such as gate seats.

Gregrs400 commented 1 month ago

The seat map array would be composed of these Seat objects.