K
K
KirylLapouski2018-02-21 13:11:34
OOP
KirylLapouski, 2018-02-21 13:11:34

Is the relationship of extension and generalization between classes the same thing?

Generalization extension and inheritance relation are three names for one relation?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Fedorov, 2018-02-21
@KirylLapouski

Extension, generalization, and inheritance are instances of the same "is a" relationship.
In general , inheritance is the repetition by the child class of the structure and functionality of the parent .
Extension is a special case of inheritance, in which the child class not only receives the components of the parent, but also implements its own components.
Generalization is the selection of a common ancestor from several classes, from which you can inherit

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question