OOP – When to support the inheritance of a combination

This question seems to be repetitive, but it is not the case. I searched on Google and the bus was unable to get conceptual clarity. There are many examples of animals and cars. However, I want to understand the basic logic
Generally speaking, composition is favored over inheritance because it provides many advantages. In this case, why inheritance is provided as one of the main concepts of OOP.
My question is when to support inheritance Better than composing?
Rather than change, maintainability, etc., I think the core concept is very important. In certain situations, the relationship seems to be more Does it matter better?

Recommended reading: Gang Of Four discusses Type, Interface, OOP, etc. before starting to discuss the mode.

Also take a look:
Composition vs. Inheritance: How to Choose?

This question seems to be repetitive, but it is not the case. I searched with Google and the bus cannot get the conceptual clarity. There are many examples of animals, cars. But , I want to understand the basic logic.
Generally speaking, composition is favored over inheritance because it provides many advantages. In this case, why inheritance is provided as one of the main concepts of OOP.
My The question is when is support for inheritance better than composition?

Rather than change, maintainability, etc., I think the core concepts are important. In certain situations, relationships seem to be better than having relationships?

Recommended reading: Gang Of Four discusses Type, Interface, OOP, etc. before starting to discuss the mode.

Also take a look:
Composition vs. Inheritance: How to Choose?

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 2782 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.