Skip to main content
PreparationZone Logo
PrepZone

Design Movie Ticket Booking

Shows, seats, concurrent holds, and payment.

Pass checkpoint below

Why this matters

  • Browse movies, showtimes, and seat maps per auditorium
  • Scope — what "Seat map" covers inside Movie Ticket Booking and what it does not
  • Scope — what "Hold timer" covers inside Movie Ticket Booking and what it does not
  • Scope — what "Booking confirmation" covers inside Movie Ticket Booking and what it does not
  • Booking problems test inventory, overlap, and concurrent holds.
BookingService
Resourceroom, seat, table
TimeSlotstart, end, capacity
Reservationstatus, userId
Typical CampusOS booking: resource, slot, reservation, user.

CampusOS context

CampusOS is the fictional smart-campus platform used across this track. Treat this module as a real product slice:

Context

  • Belongs to CampusOS — same naming and design vocabulary as parking, library, and booking modules
  • Scope is one JVM — persistence is in-memory or behind a repository interface
  • Goal is a class diagram + core Java that an interviewer can follow in 35–45 minutes
  • Extension paragraph at the end links to System Design when scale exceeds one process

Requirements snapshot

Functional requirements

  • Browse movies, showtimes, and seat maps per auditorium
  • Select seats; temporary hold expires if payment not completed
  • Concurrent users cannot book the same seat — first confirm wins
  • Payment confirms booking and issues ticket with QR code
  • Cancel before showtime releases seats back to inventory

Non-functional requirements

  • Seat hold must expire (e.g. 5 minutes) to prevent inventory lock
  • Atomic seat confirmation under concurrent booking attempts
  • Idempotent payment confirmation handler

The rest of this guide is part of Pro

Free covers every fresher guide in full. Pro unlocks Senior, Staff and Architect guides across every track.

Still to come · 6 sections

  • Overview
  • Requirements
  • Seat map
  • Hold timer
  • Booking confirmation
  • CampusOS extension

Test yourself

Answer these before moving on — recall is what makes it stick.