Example of inheritance in Object Oriented Programming
Answers
The term Inheritence means to link and share some common properties of one class with the other class. This can be done by extending a class into another class and thus using both of it.
A class acquires some properties from another class. This is possible by deriving a new class from the existing class. The new class will have the combined features of both the classes.
Taking an example of class "Animal" which can be broadly classified into 'Carnivores' (flesh eating animals) and 'Herbivores'(plant eating animals).
So, it is noticed that some of the characters or properties of the class "Animal" will be inherited by the classes Carnivores and Herbivores.
Additional Information;
● The class that gets inherited to another class is known as the base class or the super class.
● The class that inherits from the Base class is known as the derived class or the Sub-class or Target
Please Mark as brainlist!!✌❤
Hope This answer will help you!!✌❤