Introduction to Inheritance
• Inheritance is acquiring features in a class from an existing class
• Inheritance is like parent - child relation , a child class can have all of its parent
features plus his own features
• The main advantage of Inheritance is reusability of code
• Every class in python directly or indirectly is inheriting from object class
• Suppose you want to access features of rectangle in cuboid as they are almost
same then you can do the following
Rectangle Cuboid
height
breath
length
length
breath