Inheritance in C++

Inheritance lets one object acquire the properties of another object. It makes possible that an object can be a specific instance of a more generic class. 


The Shape class can have common related to any shape. The Child classes Triangle and Quadrilateral are having specific properties and also inherit the member variables and functions from the parent class Shape.