Seven tickets for six seats
transcript
Six economy seats. Seven tickets sold. Is that a bug? No. The airline meant to do it. How can a design even allow that?
Model only a seat map, and every hold takes a seat. Then tickets can never exceed seats. Overbooking cannot even be expressed.
The fix is two layers. First, a count of passengers per cabin. A policy caps that count. Second, an owner for each seat label. A booking can hold capacity and no seat.
Six seats, and a 25 percent policy. Six times 1.25 is seven and a half. Round down. The limit is seven. The eighth passenger is refused.
Everyone shows up. Check in closes. Bookings are seated in the order they bought. The one who cannot be seated is bumped and paid.
The limit comes from a policy object, not an if inside hold. It also says what a bumped passenger is paid. Swap it, and no booking code changes.
Sell capacity. Seat later. Keep the two apart.
The full design is in the lecture. Holds, policies, refunds and the close.