Design a Movie Ticket Booking System — Concept Check
Questions on Design a Movie Ticket Booking System. Model a cinema booking system with shows, seat types, concurrent seat locking, and a Singleton BookingSystem entry point.
Questions in this quiz
8 questions on Design a Movie Ticket Booking System — Concept Check. Work through them here, then start the quiz to answer them and see your score.
1.A user attempts to book a seat but receives an error stating the seat is not available. What is the most likely reason?
- AThe seat is marked as BOOKED but not paid for.
- BThe seat pricing strategy failed.
- CThe seat is already locked by another user.
- DThe seat is not part of the current show.
2.Two users attempt to lock the same seat simultaneously. What mechanism ensures only one succeeds?
- ASynchronized method in Seat class
- BPricing strategy
- CDatabase transaction
- DObserver pattern
3.A user books a recliner seat and pays successfully. What happens to the seat status?
- AThe seat status is unchanged.
- BThe seat status changes to BOOKED.
- CThe seat status remains LOCKED.
- DThe seat status changes to AVAILABLE.
4.A developer wants to add a new seat type 'VIP'. What must they update?
- AAdd to SeatType enum and update pricing strategy.
- BOnly add to SeatType enum.
- CAdd to SeatStatus enum and update pricing strategy.
- DOnly update the pricing strategy.
5.A user reports not receiving booking confirmation emails. What could be the issue?
- AObserver not registered in BookingSystem
- BSeat was not locked
- CPayment failed
- DSeat not marked as BOOKED
6.What is the role of the Singleton pattern in the BookingSystem?
- AFacilitates concurrent seat locking.
- BEnables dynamic pricing strategies.
- CEnsures a single point of coordination globally.
- DAllows multiple instances for load balancing.
7.A user locks a seat but doesn't proceed with payment. What happens to the seat after some time?
- AThe seat is automatically BOOKED.
- BThe seat is released and becomes AVAILABLE.
- CThe seat remains LOCKED indefinitely.
- DThe seat is marked as CANCELLED.
8.What happens if a seat lock fails during the booking process?
- AThe user is charged for locked seats.
- BThe system retries locking the seat.
- CAll previously locked seats are released.
- DThe booking proceeds with available seats.