Problem statement
Design the object model and public APIs for the core of a hotel management system that a single property (one hotel building) would run at its front desk. The kernel owns rooms and their inventory, the reservation lifecycle, guest check-in and check-out, nightly billing, and housekeeping status. A UI or a booking channel drives this core; you are designing the in-process domain, not the screens or the wire protocol.
Operating context. One hotel, 50-400 rooms grouped into a handful of room types (for example standard, deluxe, suite), each type holding many interchangeable physical rooms. Guests reserve a room type for a date range; a specific physical room is assigned at or before check-in. The front desk and an online channel both create reservations against the same inventory concurrently, so two bookings must never oversell the last available room of a type for overlapping dates. Rates vary by date and type (weekday, weekend, seasonal), and the folio accrues nightly room charges plus incidental line items. Housekeeping marks rooms clean, dirty, or out-of-service, and a dirty room cannot be handed to an arriving guest. Single in-process service, no distributed coordination.
Out of scope. Payment gateway and card processing (assume a charge is captured elsewhere), the HTTP/REST or channel-manager wire protocol, persistence engine (in-memory for v1), multi-property chain management and cross-hotel search, and loyalty or promo-code engines. Assume other teams own those.
What to produce. The class hierarchy (entities, value objects, and services), the public API each class exposes, the reservation state machine, and the room housekeeping state machine. Be explicit about: how per-type availability is computed over a date range so overlapping bookings cannot oversell; how a concurrent reserve of the last room of a type is made safe; how the pricing strategy is pluggable so a new rate rule drops in without touching reservation code; how the folio composes room nights and incidentals into a total; and how housekeeping status gates room assignment at check-in.
Requirements
This assessment is a Premium feature.
The statement above is free to read. The functional and non-functional requirements, and the graded canvas that scores your design against them, come with Premium.
Topics
- System Design LLD
- Oop Solid
- Patterns Strategy
- Statemachine
- Concurrency Locks