How will inheritance be shown in the sequence diagram?

Say method m of class A calls method n in class B, but the source code of class B does not contain n, since n is inherited from one of the superclasses B.

What will the sequence diagram look like?

Will there be a message interaction between A and B by method n or will it be with A and superclass B using method n

+5
source share
1 answer

If you must comply with the principle of encapsulation, the interaction will consist only between Aand B. The fact that the implementation Buses inheritance is not related to the code written in A- the only world view is that it calls the method on B.

B A. .

+3

All Articles