Relationships

A relationship between two classes is a UML entity that represents the fact that the classes are somehow related to each other. Examples of relationships are:

association— class A is associated with class B.

aggregation— class A aggregates class B.

inheritance— class A inherits from class B.

realization— class A implements interface IB.

We will give examples of all these types of relationships shortly.

We can classify relationships in two general categories: has-a type of relationships (when we can say that an object of type A has an object of type B), and is-a relationships (when we can say that an object of type A is also of type B). Association and aggregation are has-a relationships. Inheritance and realization are is-a type ...

Get Visual Basic® .NET by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.