How will inheritance is depicted in a sequence diagram?

半城伤御伤魂 提交于 2019-12-04 06:59:29

If you're to respect the principle of encapsulation, the interaction would purely be between A and B. The fact that B's implementation uses inheritance is of no concern to the code written in A - it's sole world view is that it calls the method on B.

You can safely change the implementation in B and not affect A. This is another reason to diagram the interactions this way.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!