显示双向和组合关系UML类图
我有两个课程“事件”和“回顾”。
该事件中有一个实例对象 Review。 评论中也有一个对象事件。 这意味着它们之间存在双向关系(两个箭头)。
删除事件后,评论也将被删除。 这意味着它们之间的组合关系(事件中的实心菱形)。
现在我的问题是: 如何将两个箭头和实心菱形一起显示在同一行?
我想知道在显示组合或聚合时是否应该忽略方向关系? 通过关联,可以毫无问题地显示方向箭头,但是有了菱形就有问题了......
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...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
回答问题的标题:可以使用双箭头(两端各一个)或根本不使用箭头来显示双向导航(由于关联是双向的,因此无需添加箭头)。
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).