Dependency is a weaker form of relationship which indicates that one class depends on another because it uses it at some point of time
One class depends on another if the latter is a parameter variable or local variable of a method of the former.
This is different from an association, where an attribute of the former is an instance of the latter.
http://en.wikipedia.org/wiki/Class_diagram#Analysis_stereotypes
- Dependency relationships
a dependency is displayed in the diagram editor as a dashed line with an open arrow that points from the client model element to the supplier model element.
a dependency relationship is a relationship in which changes to one model element (the supplier) impact another model element (the client). You can use dependency relationships in class diagrams, component diagrams, deployment diagrams, and use case diagrams.
Example
In an e-commerce application, a Cart class depends on a Product class because the Cart class uses the Product class as a parameter for an add operation. In a class diagram, a dependency relationship points from the Cart class to the Product class. The Cart class is, therefore, the client model element, and the Product class is the supplier model element. This relationship indicates that a change to the Product class might require a change to the Cart class
http://publib.boulder.ibm.com/infocenter/rsdvhelp/v6r0m1/index.jsp?topic=%2Fcom.ibm.xtools.modeler.doc%2Ftopics%2Fcdepend.html
No comments:
Post a Comment