Give an real life example of inheritance?
A family tree getting their features in any form and being represented.
Inheritance is used for reusable of one object's properties. 30 students learn maths from 1 Teacher in one class per hour. (Students inherit the knowledge from a Each Teacher) 100 Students Learn Science from 1 Teacher. Each subject covered by one student. Totally 5 Teachers cover 5 subjects to more than 100 students. So, end of the School or college days, the 100 students become a Skilled person in Various Domain by 5 Teachers. (Note: There is no 100 Teachers for 100 Students ) Here 5 Teachers knowledge or Skill is reused to the 100 Students, every time. This is the concept of Inheritance (Re Usable). Thanks for reading!..