What is the meaning of dashed arrow in UML class diagram?
Asked Answered
M

2

26

What is the meaning of the dashed arrow in a UML class diagram in general?

As an example: What is the meaning of the dashed arrow in this image (from client to ConcreteCommand):

enter image description here

Article: Command pattern

Millur answered 17/7, 2012 at 11:32 Comment(0)
T
20

Between Client and ConcreteCommand::
It means dependency.
Dependency: The definition or implementation of the dependent classifier might change if the classifier at the arrowhead end is changed.

Between ConcreteCommand and Command means Realization::
Realization: The class implements the operations and attributes defined by the interface. The interface is at the arrow end of the connector.
(Use the Inheritance tool to create a realization between a class and an interface.)

Trondheim answered 17/7, 2012 at 12:10 Comment(1)
It might be a typographical error, but in the case of a class diagram denoting the relationships between classes, do you think a dashed line with a filled arrow head (not hollow) means dependency? The other links in the diagram are aggregation, realization and generalizationKeegan
A
6

The dashed arrow (from client to ConcreteCommand) means that there is an (unidirectional) association between instances of these classes. An instance of client is using an instance of ConcreteCommand but lifecycle of ConcreteCommand (creation and destruction) are not depending of Client instance. The direction of the arrow means that Client instance uses ConcreteCommand instance but not vice versa

Acerb answered 17/7, 2012 at 11:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.