Section 1/3Class Relationships
Class Relationships
All three are aggregation relationships — no object owns another.
Project: Library System
Build a library management system. This project practises aggregation (Library holds Books and Members), state management (book availability), and cross-object interaction (borrowing links Members and Books).
Class Relationships
Library ◇────── Book (aggregation: books exist independently)
Library ◇────── Member (aggregation: members exist independently)
Member ◇────── Book (borrowed_books list — weak reference)All three are aggregation relationships — no object owns another.