Define the term inheritance and polymorphism.
Inheritance:
Inheritance is the process by which objects of one class acquire the properties of objects of another class. It supports the concept of hierarchical classification.
Polymorphism:
Polymorphismrefers to the way of operating the same operator in different ways and different method or purpose. Operator overloading and the operation overloading are the examples of polymorphism. For example ‘+’ operator can be used for arithmetic operation and string concatenation both.