Office Seat-Management App Design
Problem Statement
π― Objective
Design a system that allows employees to book, release, and manage office seats in a flexible workplace environment.
The goal is to optimize seat allocation, real-time availability tracking, and booking management while supporting features like seat preferences and team-based allocations.
πΉ Context
Modern offices use hybrid work models, where not all employees are in the office every day.
An Office Seat-Management App helps companies manage this by:
You are tasked with designing the class-level structure (LLD) for such a system.
β Functional Requirements
π§βπΌ Employee Features
View Seat Availability
Book a Seat
Cancel Reservation
View My Bookings
Seat Preferences (Optional)
π§βπΌ Admin Features
βοΈ Non-Functional Requirements
RequirementDescription
Scalability
Should support multiple office locations, floors, and hundreds of seats.
Consistency
Ensure no seat double-booking (atomic transactions).
Extensibility
Allow easy addition of features like team-based reservations or recurring bookings.
Performance
Booking and availability checks should be fast (O(log n) ideally).
Usability
Should expose APIs that can be integrated with a web/mobile front-end.
π§© Core Entities & Responsibilities
ClassDescription
Seat
Represents an individual seat with unique ID, location, status (available/booked/blocked).
Floor
Represents a collection of seats in a given floor.
Office
Represents a building or office location with multiple floors.
Employee
Represents a user who can book or cancel seats.
Booking
Represents a reservation made by an employee for a seat on a particular date/time.
BookingManager
Handles creation, cancellation, and validation of bookings.
SeatManager
Manages seat availability, status updates, and layout changes.
Admin
Subclass of Employee with elevated privileges to block/unblock or add seats.
π§Ύ Sample Class Diagram (Text Form)
1
2βββββββββββββββββββββββββββ
3β Office β
4βββββββββββββββββββββββββββ
5β - officeId β
6β - name β
7β - floors: List<Floor> β
8β + getAvailableSeats() β
9ββββββββββββββββ¬βββββββββββ
10 β
11 βΌ
12βββββββββββββββββββββββββββ
13β Floor β
14βββββββββββββββββββββββββββ
15β - floorId β
16β - seats: List<Seat> β
17β + getSeatById() β
18ββββββββββββββββ¬βββββββββββ
19 β
20 βΌ
21βββββββββββββββββββββββββββ
22β Seat β
23βββββββββββββββββββββββββββ
24β - seatId β
25β - location β
26β - status (AVAILABLE, BOOKED, BLOCKED) β
27β + isAvailable(date) β
28βββββββββββββββββββββββββββ
29
30βββββββββββββββββββββββββββ
31β Booking β
32βββββββββββββββββββββββββββ
33β - bookingId β
34β - employeeId β
35β - seatId β
36β - date β
37β - status (CONFIRMED/CANCELLED) β
38βββββββββββββββββββββββββββ
39
40βββββββββββββββββββββββββββ
41β BookingManager β
42βββββββββββββββββββββββββββ
43β + createBooking(emp, seat, date) β
44β + cancelBooking(bookingId) β
45β + getBookingsForDate(date) β
46βββββββββββββββββββββββββββπ§ Example Scenario
Input:
Flow:
Output:
1
2Booking successful!
3Seat S12 reserved for Sahil on 25-Oct-2025.βοΈ Design Patterns
π Possible Extensions
π¬ Interview Prompt Summary
Design a Seat Management System for an Office.
The system should allow employees to view, book, and cancel seat reservations while ensuring that seats are not double-booked.
Include class design for core entities like Seat, Floor, Booking, and BookingManager, and consider extensibility for admins, preferences, and analytics.
ChatGPT ca