Chapter 7: Inheritance

Learning Objectives

After completing this chapter, you should be able to do the following:

  1. Understand what inheritance is and how programmers can use it.
  2. Understand what abstract classes and methods are.
  3. Learn how to formally diagram classes and the relationships between classes.

Key Terminology

As you read through the chapter, look for the following key words.

Inheritance

  1. Inheritance
  2. Subtyping

Inheritance in Java

  1. Extends
  2. Subclass
  3. Child class
  4. Super class
  5. Base class
  6. Parent class
  7. Derived class
  8. Object class

A Tale of Two Cats

  1. base
  2. no-arg constructor
  3. override
  4. method overriding

Inheritance from Abstraction

  1. Abstraction
  2. abstract
  3. Abstract class
  4. Abstract method

Casting

  1. Runtime exception
  2. Polymorphism

Class Diagrams

  1. Class diagrams
  2. One-to-One Relationship
  3. One-to-Many relationship