Class Diagrams ll Flashcards
What is aggregation?
Type of association used to express that a class is part of another class
Transitive aggregation
An aggregation relationship that can be chained through multiple levels
Transitive aggregation example
If B is part of A and C is part of B, C is also part of A
Asymmetric aggregation
An aggregation relationship that is not bidirectional
Asymmetric aggregation example
It is not possible for A to be part of B and B to be part of A simultaneously
Shared aggregation
A relationship between classes where one class aggregates multiple instances of another class which can be shared among multiple classes
Shared aggregation syntax
Hollow diamond at the aggregating end
Composition
A relationship between two classes where one class is composed of one or more instances of another class
Composition syntax
Solid diamond at the aggregating end
Generalisation
A hierarchical relationship where a sub/child class inherits attributes and behaviours from a super/parent class
Abstract class
A class that cannot be instantiated on its own and is designed to serve as a blueprint for other classes
Multiple inheritance
Allows a subclass to inherit characteristics and behaviours from more than one superclass
Class
Description of the structure and behaviour of a set of objects