ABSTRACT

A child class can override data members and methods from the parent class. The child class gets the properties and can retrieve all the data properties and functions specified in the parent class. The main advantage of the inheritance is the code reusability. The different types of inheritance are as follows: single inheritance, multiple inheritance and multilevel inheritance. In Python, a child class inherits base class by declaring the base in the bracket following the child class name. In Python a class can inherit many classes by declaring all base class within the bracket. The preceding program invokes parent class method using the child class. The preceding program invoking the parent class constructor from the child class using super. The preceding program is with multiple inner class for both the parent class and the child class.