Please enable JavaScript to use CodeHS

Chapter 9

Inheritance

9.1 Inheritance

Superclasses and Subclasses

The extends keyword

Person Superclass

Vehicle Superclass

High School Student

Check Your Understanding

  1. Invalid Answer

Exercise: Computers

Vocabulary

Term Definition
Superclass A parent class that contains common attributes and behaviors used by subclasses (children).
Subclass A child class that inherits attributes and behaviors from a superclass (parent).
Is A A relationship between two items that represent a superclass / subclass relationship
Has A A relationship between two items that represents an instance variable relationship.