Lecture 10: Inheritance & Other Relationships

This lecture considers the different types of relationship that can exist between classes, and looks at their representation in UML and code. It starts with association, which expresses a collaboration between classes, before moving on to consider composition and aggregation, which represent the relationship between a ‘whole thing’ and its component parts.

The bulk of the lecture focuses on inheritance as an expression of the ‘is a kind of’ relationship. The details of how inheritance works in Java are explored, using a small example.

Useful resources: