Medium

Design a Library Management System Object-Oriented Design Interview

Design a library that models catalog titles versus physical copies, members and librarians, checkout/return/renew/reserve flows with loan due dates, an overdue fine policy, and notifications as a boundary.

1. Problem Statement

Design a library management system: members check out, return, and renew physical copies of catalogued titles, and can place a hold on a title with no available copy. Loans have due dates, late returns incur a fine, and members are notified when a hold becomes available. Start by clarifying scope and the key objects.

2. Live Coding Format

Work in the provided coding workspace while explaining your decisions to the live interviewer. Validation may use inline tests, examples, comments, or a verbal walkthrough.

3. Key Focus Areas

  • 1
    Title vs. physical Copy modeling
  • 2
    Checkout / return / renew / reserve lifecycle
  • 3
    Reservation (hold) queue ordering and renewal blocking
  • 4
    FinePolicy strategy and NotificationService boundary

4. What Strong Candidates Should Demonstrate

  • Separate a catalog Title from its physical Copies and give each clear ownership.
  • Model loans, due dates, and an ordered reservation queue with correct invariants.
  • Encapsulate copy-status transitions so contradictory states are impossible.
  • Isolate fine calculation behind a policy and notifications behind a boundary.

Want interactive feedback?

Practice this problem in the live coding workspace while the interviewer probes your clarification, implementation, trade-offs, and validation.

Continue to Dashboard

Core Concepts

Object-Oriented DesignDomain ModelingStrategy PatternState Modeling

Continue preparing

Build a complete software engineer mock interview plan

Related Object-Oriented Design

Design a Car Rental System

Design a car rental domain model covering vehicle categories and vehicles, branches, customers and drivers, a rental date range, rate-based quotes, reservations, pickup rental agreements, and return inspection with extra charges — preventing overlapping rentals of the same vehicle.

Related Object-Oriented Design

Design a Cricket Information Platform

Design a cricket scoring domain model covering teams and players, a match, innings, overs and deliveries, batting and bowling scorecards, extras and wickets, striker rotation, over completion, and match results for a configurable limited-overs format.

Related Object-Oriented Design

Design a Question and Answer Platform

Design a Q&A platform domain model with users, questions, answers, comments, tags, votes, an accepted-answer rule, and a reputation policy, with the voting, acceptance, and reputation invariants enforced in the model.

Related Object-Oriented Design

Design a Rare Book Condition Management System

Model the core domain objects for tracking physical condition assessments of rare library books, with immutable scan history and structured condition report generation.