Inheritance

What is inheritance?

By using inheritance, you can create a new class that inherits the attributes and methods of the original class.

What is a parent class?

A parent class is the class where the child class needs to call on, and is included in parentheses.

What is a child class?

A child class is what often needs to call on, and is defined like a normal class.

How do you use inheritance?

The child class __init__() method often needs to call the parent class __init__() method by using super(). The super() function references the parent class and allows you to call methods from the parent class.