Object-oriented design interview questionMedium
Shopify

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.

1. Problem Statement

Design an in-memory system for a library to manage the physical condition of rare books. Librarians register condition scans for each book, and curators can request a structured condition report. Start by clarifying the scope and 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
    Book and ConditionScan entity responsibilities
  • 2
    Immutable scan history and audit trail integrity
  • 3
    ConditionReport contract: comparison, trend, and summary generation
  • 4
    AssessmentStrategy interface for extensible scoring
  • 5
    Repository and service boundary separation

4. What Strong Candidates Should Demonstrate

  • Model Book and ConditionScan as distinct domain entities with clear ownership.
  • Enforce immutability on the scan history so the audit trail cannot be altered.
  • Design a ConditionReport as a derived, read-only view over the scan history.
  • Abstract assessment scoring behind a strategy interface for extensibility.
  • Write tests, run or traced by hand, for scan registration, report generation, and extension scenarios.

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

Hidden because they name the technique, which a real interviewer would not tell you.

Show core concepts
Object-Oriented DesignImmutable HistoryStrategy PatternDomain Modeling

Continue preparing

Build a complete software engineer mock interview plan

Related Object-Oriented Design

Design an Airline Management System

Design an airline domain model covering airports, aircraft seat layouts, scheduled flights versus dated flight instances, passengers, reservations and tickets, seat assignment, and flight status transitions.

Related Object-Oriented Design

Implement an In-Memory Rate Limiter

Design and implement an in-memory rate limiter as an object-oriented module, validate it with concrete test cases, and discuss concurrency considerations.

Related Object-Oriented Design

Design an ATM Transaction Engine

Design an ATM that authenticates a card and PIN, and supports balance inquiry, cash withdrawal with denomination dispensing, and deposits, including session/state handling and hardware abstractions.

Related Object-Oriented Design

Design Blackjack and a Deck of Cards

Design a reusable deck of cards and a single-round Blackjack game: cards, suits and ranks, deck shuffle/deal, hand scoring with flexible ace values, player and dealer turns, and terminal outcomes (blackjack, bust, win/lose/push).