Inheritance- In this the object would acquire the property of other object
present. It just follows the concept of the hierarchical classification. This
consists of classes, sub classes. Inheritance also is linked or interacts with
encapsulation as well.
Polymorphism- It is means many ways to carry out the method but from one