Inheritance: From general to specific
Inheritance lets you define a new class from an existing one. That removes duplicated code: you put shared behavior in a parent class and specifics in a child class.
Inheritance lets you define a new class from an existing one. That removes duplicated code: you put shared behavior in a parent class and specifics in a child class.