/Airline-Boarding

Calculates how long it takes to board a plane.

Primary LanguageC++

Airline-Boarding

Program calculates time required to board 288 passengers onto a standard jet plane. Certain behaviors are taken into account:

  1. Each previously seated passenger who is seated closer to the aisle than a newly arrived passenger’s assigned seat, must leave their seat, and step into the aisle, and then return to their seat after the new passenger has seated herself.

  2. Each passenger takes 10 seconds to store their carry-on luggage.

  3. When the aisle in the next row is clear, a passenger takes 5 seconds to move to the next row.

  4. Getting to or from one’s seat in a row takes 5 seconds

  5. No passenger may pass another passenger in an aisle