MATLAB Object-Oriented Programming

(Joyce) #1

Hierarchies of Classes — Concepts


In this section...
“Classification” on page 12-2
“Develop the Abstraction” on page 12-3
“Design of Class Hierarchies” on page 12-4
“Super and Subclass Behavior” on page 12-4
“Implementation and Interface Inheritance” on page 12-5

Classification


Organizing classes into hierarchies facilitates the reuse of code and the reuse of solutions
to design problems that have already been solved. You can think of class hierarchies as
sets — supersets (referred to as superclasses or base classes), and subsets (referred to as
subclasses or derived classes). For example, the following picture shows how you could
represent an employee database with classes.

12 How to Build on Other Classes

Free download pdf