What is hierarchical inheritance explain with example?

In hierarchical inheritance, all features that are common in child classes are included in the base class . For example, Physics, Chemistry, Biology are derived from Science class. Similarly, Dog, Cat, Horse are derived from Animal class.

Sizin İçin Seçtik  Bitcoin ilk kim buldu?

Leave a Reply

Your email address will not be published. Required fields are marked *