Medium
Shopify

Design a Rare Book Condition Management System Object-Oriented Design Interview

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 handwritten tests 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.

Start Interview

Core Concepts

Object-Oriented DesignImmutable HistoryStrategy PatternDomain Modeling