如何在 UML 类图中显示私有继承关系
在 C++ 中,由于私有继承不被视为 is-a
关系,因此它应该如何在类图中显示以及是否显示为 has-a
那么如何区分组合和私有继承呢?
In C++ since private inheritance is not considered as an is-a
relationship, how is it supposed to be shown in a class diagram and if it is shown as a has-a
relationship then how can it be differentiated between a composition and a private inheritance?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
它应该是组合关系(子类一侧的实心黑色菱形),因为:
It should be a Composition relationship (solid black diamond on the subclass side), because: