AP CS 10: Class Inheritance

Premium Lesson

This is a premium course. To view and assign premium course, you must upgrade your account

Upgrade Now

We can share properties and methods across classes by linking them under a Parent->Child hierarchy. This helps us group similar classes together

Course Items

Inheritance Introduction

Inheritance allows us to group similar classes under a more general parent class

Overriding vs Overloading

Adding a method to a Child class that does not exist in the Parent class is called overloading, writing a method of the same name as a method in the Parent class is called overriding

Adding Parent Methods

We can add a method to the Parent class and all Child classes will inherit it

Is-a vs Has-a

The difference between an Objects that has-a Class and is-a Class

Abstract Classes

An Abstract Class is one that is only meant to be used as a parent class and never to be instantiated as an object

The Object Superclass

All classes that do not state a class they extend from, extend from the class Object

The Pet Cafe

Our Cat Cafe has taken off and we've now expanded it to a Pet Cafe. Inheritance can save us some time when remodeling our system

AP CS 10: Class Inheritance Info


AP Computer Science





Created By


AP CS 10: Class Inheritance Prereqs