Lecture 3: Relationships and Packages Flashcards
What is a relationship?
A relationship is a connection between modelling elements
What does association have between classes?
- Aggregation
- Composition
- Association classes
What is a link?
- Is the connection between objects
* How they communicate using messages to invoke operations
What is the term used to implement links in OO programming?
Object references/Pointers
What is an association?
- Relationships between classes
* Links Instantiate association
What is multiplicity?
Is a constraint that specifies the number of objects that can participate in a relationship
What is a reflexive association?
- Is a relationship that “reflexes” itself.
* Objects of the class have links to other objects of the same class
What is navigability?
• Traverse an object SOURCE CLASS into a TARGET CLASS
What is the standard practice of navigability?
- Bi-directional associations have NO arrows
- Unidirectional associations have a SINGLE arrow
- Can’t show association that are navigable in BOTH directions
When do we use association?
- The target class is important part of the model
* Target class shown in the model
When do we use attributes?
- When it is not the important part of the domain (number/string)
- Just an implementation
What is a association class syntax?
The association class consists of the class, the association and the dashed line
What two important links does association class syntax consist of?
They are links that have attributes and operations
When can you use association classes?
When there is only ONE UNIQUE LINK between objects
What is generalisation?
A relationship between a common class that shares the same attributes and behaviour in a generalised class