Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • The relationship between a superclass and an inherited class is called an “is a” relationship.

    • A grasshopper “is a” insect.

    • A poodle “is a” dog.

    • A car “is a” vehicle.

  • A specialized object has:

    • all of the characteristics of the general object, plus

    • additional characteristics that make it special.

  • In object-oriented programming, inheritance is used to create an “is a” relationship among classes

  • We can extend the capabilities of a class.

  • Inheritance involves a superclass and a subclass.

    • The superclass is the general class and

    • the subclass is the specialized class.

  • The subclass is based on, or extended from, the superclass.

    • Superclasses are also called base classes, and

    • subclasses are also called derived classes.

  • The relationship of classes can be thought of as  parent classes and child classes.

Image Removed