Loading…
Loading…
The tricky part of this problem: "Book" and "physical copy of a book" are two different concepts that most first attempts conflate into one class — what breaks if you don't separate them? Also consider: different member types having different rules (checkout limits, loan duration) is exactly the shape of a problem Strategy or a simple type hierarchy can solve — which fits better here, and why?
Design your own solution first — on paper, a whiteboard, or your own IDE — before checking the reference.