Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UML inheritance - why is the direction of arrow from the subclass to the parent-class?

Image: Class B extends class A. Then Why is the arrow from B to A?

In the image above class B inherits class A. If B inherits all A's methods, shouldn't the arrow be from A to B? In my opinion it would make more sense if the arrow was from A to B.

Is there a reason that the direction of the arrow is this way and not the other way around? I would love to hear the explanation. Thank you.

EDIT: I know that this is the way that UML is designed, and that the diagram above is true according to the rules of UML, but my question is why UML made the arrow go this way .

like image 587
user194878 Avatar asked Apr 25 '18 16:04

user194878


1 Answers

The reason is that in your case B references (or as you will calls out to) A. There is no knowledge about B in A, so no arrow from A to B, but rather the other way around.

The UML entity diagram is not about who 'gets' what, but rather about who references/knows about who.

like image 177
Hiery Nomus Avatar answered Sep 23 '22 10:09

Hiery Nomus