简体   繁体   中英

Display bidirectional and composition relation UML class diagram

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 relationship 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...

要回答这个问题的标题:可以使用双箭头(两端各一个)或根本不显示箭头来显示双向导航(由于关联是双向的,因此无需添加箭头)。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM