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.
Where is the best home for 'a member can hold at most 5 loans'?
- AWith the member and its loans (or a lending policy that inspects them)
- BIn the Book class
- 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.
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