Inheritance lets a class derive behavior and structure from a parent class. In a library system, Members and Librarians can inherit login behavior from User, avoiding duplicated code when requirements are known in advance. section 1.1.2 section 1.2.4
The tidy hierarchy becomes less tidy when requirements change. Adding VIPMember sounds small: VIP members are still members, but they may add book items independently. Yet the reusable operation is locked inside Librarian::addBookItem, so reusing it requires another class relationship rather than simply moving data through a shared operation. section 1.2.4
The deadline feature
With two days left before release, Nancy requests VIP members. Theo must decompose the request into “VIP members are library members” and “VIP members can add book items,” exposing how class-bound behavior turns a supposedly tiny change into hierarchy work. section 1.2.4
Use the member-and-librarian class diagram to inspect the inheritance structure behind shared login behavior. section 1.2.4


















