Phase 1: Requirements & Use Cases
Interviewer: "Design a library management system."
Candidate: "Before I model anything, let me reframe that statement. A library management system is responsible for tracking books, managing member accounts, handling checkouts and returns, enforcing loan rules, processing fines, and supporting catalog search. Is that a fair scope?"
Interviewer: "Yes. Who are the actors?"
Candidate: "I see three primary actors:
- Member — a registered library patron who searches the catalog, borrows and returns books, makes reservations, and pays fines.
- Librarian — a staff member who adds and removes books, manages members (block/unblock), and has elevated system access.
- System — the automated component that triggers overdue notifications, updates book availability when a reservation activates, and auto-calculates fines.
And the core use cases:
- Search catalog — by title, author, subject, or publication date
- Checkout a book item — borrow a specific physical copy
- Return a book item — return it, trigger fine assessment
- Reserve a book — queue a hold when all copies are checked out
- Cancel a reservation
- Renew a loan — extend due date if no pending reservations
- Pay a fine
- Add / remove / edit books (Librarian only)
- Block / unblock a member (Librarian only)"
Interviewer: "Should we support multiple library branches?"
Candidate: "I'd scope that out for this design. Multi-branch introduces distributed inventory, cross-branch transfers, and inter-branch loan policies — a substantial surface that distracts from the core OOD challenge. I'll model a single library with a single physical catalog. If we needed multi-branch…
In the full tutorial
- Phase 2: Object Modeling
- Phase 3: Class Design & Relationships
- Phase 4: Design Patterns Application
- Phase 5: Key Implementation
- Phase 6: Extensibility & Trade-offs