DSA Factory
Free Low-level design lessonsLow-level design · Stage 1 · Case studies · Step 4

Case study: library management

Entities, lending rules and invariants: where the borrow limit, due dates and fines belong. About 12 minutes.

Quick check

Where is the best home for 'a member can hold at most 5 loans'?

  1. AWith the member and its loans (or a lending policy that inspects them)
  2. BIn the Book class
  3. CIn the fine calculator
Show the answer

With the member and its loans (or a lending policy that inspects them). It needs the member's current loans.

Lock it in

4 questions on this idea

Short questions that apply the idea to new cases: trace it, work out a number, put steps in order. A wrong answer explains itself.

Answer them in your browserFree account, no card. Your progress is saved, and the idea comes back in a quick review later.
Sign up free to solve