Mastering Association, Aggregation, Composition, and Inheritance with UML syntax and code.
A loose relationship where objects have their own lifecycle and there is no ownership. 'Uses-A' or 'Knows-A'.
A 'Has-A' relationship where the child can exist independently of the parent. Weak ownership.
Strong 'Has-A'. The child cannot exist without the parent. If parent is destroyed, child is too.
An 'Is-A' relationship. The child class inherits fields and methods from the parent.
A weaker form of association where one class depends on another temporarily (e.g., method parameter).
A class implements an interface. It promises to fulfill the contract defined by the interface.
Passing responsibility to another object. Alternative to inheritance ('Composition over Inheritance').