Why does the arrow rise as a legacy?

When you draw an inheritance chart, you usually go

                          Base
                            ^
                            |
                         Derived

The base is being expanded. So why does the arrow go up?

I thought that meant “Derived communicates with the base” by calling functions in it, but Base cannot call functions in Derived.

+7
language-agnostic inheritance
source share
6 answers

AFAIK One reason is notation. All other directional arrows (dependence, aggregation, composition) indicate from dependent to dependent.

In inheritance, B depends on A, but not vice versa. Thus, the arrow indicates B to A.

+5
source share

In UML, an arrow is called the Generalization relation, and it only signals that each object of the Derived class is also an object of the Base class.

From add-in 2.1.2:

A Generalization is shown as a line with a hollow triangle as an arrowhead between the symbols representing the involved classifiers. The arrowhead points to the symbol representing the general classifier. This notation is referred to as the "separate target style." 

Not quite the answer, although to the question :-)

+2
source share

I always think about it, since B has more things in it, then A (subclasses often have more methods than superclasses), therefore B gets the wide end of the arrow and A gets the pointed end!

+1
source share

Read the arrow as “inherited,” and that makes sense. Or, if you want, think about it, as directional calls can be made.

+1
source share

B - subject, A - object, action - inheritance. Thus, B acts on A, therefore, the direction of the arrow.

0
source share

I think the point is to express a “generalization”: A is a generalization of B.

Thus, the arrow expresses the same concept as in the extension, but goes the “right” way.

0
source share

All Articles