开发者

Association name direction in UML use case diagram

What exactly means the association name direction (painted as a black triangle near the association name) in UML use case diagram? And what's the difference between it and association direction?

Let me paste some link that explains what exactly I'm asking abo开发者_高级运维ut:

http://docs.google.com/leaf?id=0Bwtg6A48dQQjODBlNTJiNzQtYmE1OC00YmViLTk3ZGEtYjQ1MDYwMDFkZTIz&sort=name&layout=list&num=50


A solid triangle next to the association name just informs the reader about the direction in which the association should be read for the association name to make sense. For instance an association "LivesIn" between Person and City could be read either as "City LivesIn Person" or "Person LivesIn City". In this case, the reading direction of the association in order to make sense is clear, but in other situations it may be more ambiguous. If we want to clarify how the association should be read, then we can indicate that by means of adding the small black triangle next to the name pointing in the desired direction.

This does not affect the semantic of the association.


In the usecase diagram you don't usually show aggregation/composition but only simple association link with no arrows at the end. You have four kinds of association in the class diagram: - bidirectional - undirectional - aggregation - composition

btw, I never asked myself why we don't show full association type, multiplicty, associations ends etc...in the usecase diagram ? This is strange.


Generally, the small arrows on the text of an association are for readability, a hint as to the direction the text should read. The below example is for class diagrams but the same would be true for a use case diagram. I've never seen a good example of when to use them on a use case diagram though.

The association direction indicates the direction of visibility. If a pilot flies multiple flights in one day, do you want to go to the pilot to get the list of his flights

Association name direction in UML use case diagram

or go to the flight to find the pilot?

Association name direction in UML use case diagram

Sometimes it's easier to indicate in the association which way to read it with no direction arrow on the association line itself.

Association name direction in UML use case diagram

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜