Advanced Relationships
Advanced Relationships can be categorized as:
- Dependency
- Generalization
- Association
- Realization
Dependency
- Specifying a change in the specification of one thing may affect another thing, but not necessarily the reverse
- Graphically rendered as a dashed line
- There are eight stereotypes that apply to dependency relationships among classes and objects in class diagrams
bind | The source instantiates the target template |
derive | The source may be computed from target |
friend | The source is given special visibility into target |
instanceOf | Source object is an instance of the target classifier |
instantiate | Source object creates instance of the target |
powertype | Target is a powertype of the source |
refine | Source is at a finer degree of abstraction than target |
use | The semantics of the source element depends on the semantics of the public part of the target |
Two stereotypes that apply to dependency relationships among packages
- Access - Source package is granted the right to reference the elements of the target package
- Import - A kind of access, but only public content
Two stereotypes that apply to dependency relationships among use case
- Extend - Target use case extends the behavior of source
- Include - Source use case explicitly incorporates the behavior of another use case at a location specified by the source
Three stereotypes when modeling interactions among objects
- Become - Target is the same object of source at later time
- Call - Source operation invokes the target operation
In the context of state machine
- Send - Source operation sends the target event
In the context of organizing the elements of your system into subsystem and model
- Trace - Target is a historical ancestor of the source (model relationship among elements in different models)
Generalization
- A generalization is a relationship between a general thing and a more specific kind of that thing
- In multiple Inheritance one class may have more than one parent
- Complete: Means that all children in the generalization have been indicated in the model and that no additional children are permitted
- Incomplete: Means that all children of the generalization may not have been included and new ones can be added later
- Disjoint: Depicts that objects of the parent do not overlap, i.e., they belong to only one child class
- Overlapping: Indicates that objects of the parent may have more than one of the children as a type
Association
Advanced adornments: Navigation, Qualification, Various flavors of aggregation
Navigation: Adorning an association with an arrowhead pointing to the direction of traversal
Visibility: Objects at that end are not accessible to any objects outside the association
Qualification: This is an attribute whose values partition the set of objects related to an object across an association.
Composition: A form of an aggregation with strong ownership and coincident lifetime of the parts by the whole
Constraints:
- Implicit: The relationship is not obvious and may be conceptual
- Ordered: The set of objects at one end of an association are in a piece of order
- Changeable: The links among the objects may be altered
- AddOnly: New links may be included from an object on the opposite end of the association
- Frozen: An existing link may not be deleted or modified
- XOR: Over a set of relationships, exactly one is apparent for each associated object
Realization
--A realization is a semantic relationship between classifiers in which one classifier specifies a contract that another classifier guarantees to carry out
--Used in two circumstances
--Used in two circumstances
- In the context of interfaces
- In the context of collaborations
--Graphically rendered as dashed directed line with a large open arrowhead