开发者

Display bidirectional and composition relation UML class diagram

开发者 https://www.devze.com 2023-02-14 06:26 出处:网络
I have two classes Event and Review. The event has an instance object Review in it. A review also has an object Event in it.

I have two classes Event and Review.

The event has an instance object Review in it. A review also has an object Event in it. This means a bidirectional relationsh开发者_如何转开发ip between them (two arrows).

When an event is deleted the review will also be deleted. This means a composition relationship between them (filled diamond at Event).

Now my question is: How can I display the two arrows and the filled diamond together in the same line?

I'm wondering if I should left out the directional relation when showing the composition or aggregation? With association the direction arrow(s) can be displayed with no problem, but having the diamond there is a problem...


To answer the headline of the question: bidirectional navigations can be shown using a double arrow (one at each end) or no arrow at all (since the association is bidirectional, there´s no need to add arrows).

0

精彩评论

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