If I represent all 3 classes on the diagram, and then draw an arrow between class 1 and 3, it looks like 1 is directly invoking 3, which it isn't. However, I also don't want to make it look like Class 2 is implementing that method.
You have a fundamental error in your thought. SDs and ADs do not show classes, but instances. And there are only two instances here, namely that of Class1
and that of Class2
being a subclass of Class3
. So the internal call from Class2
's instance goes to itself.
The structure is like this:
And the SD like that:
In an AD it would look like this:
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.