Design Hotel Management System
| Difficulty: Medium | Source: awesome-low-level-design |
Requirements
- Book rooms, check-in, check-out
- Room types: single, double, deluxe, suite
- Room availability and reservation status
- Manage guest info, room assignments, billing
- Multiple payment methods
- Concurrent bookings
- Reporting and analytics
- Scalable
Class Diagram

Classes, Interfaces and Enumerations
| Class/Interface | Description |
|---|---|
| Guest | id, name, email, phone |
| Room | id, type, price, status; book/check-in/check-out methods |
| RoomType | Enum: single, double, deluxe, suite |
| RoomStatus | Enum: available, booked, occupied |
| Reservation | id, guest, room, dates, status |
| ReservationStatus | Enum: confirmed, cancelled |
| Payment | Interface defining payment contract |
| CashPayment | Concrete payment implementation for cash |
| CreditCardPayment | Concrete payment implementation for credit cards |
| HotelManagementSystem | Singleton; synchronized methods for thread-safe booking management |
Design Patterns Used
| Pattern | Application |
|---|---|
| Singleton | HotelManagementSystem has a single instance managing the entire hotel |
| Strategy | Payment interface allows swapping payment methods (cash, credit card) at runtime |
Code Implementations
| Language | Source Code |
|---|---|
| Java | View on GitHub |
| Python | View on GitHub |
| C++ | View on GitHub |
| C# | View on GitHub |
| Go | View on GitHub |