Inheritance

What is inheritance?

Inheritance is the idea of basing one class on another class so the new class can use the existing attributes and methods. When your classes are modeled on similar things, use inheritance instead of starting a new class.

What is a parent class?

A parent class is the original class where it has it's attributes and methods able to be inherited by a child class.

What is a child class?

A child class is what inherits the attributes and methods from the parent class. When you write a child class, you can add any attributes or methods that aren't in the parent class, as well as customize the behaviors inherited from the parent class.