Next: The class Object
Up: Unit 08
Previous: Polymorphism
- A class can have several subclasses. For example, we could define a
subclass ExpertPerson of Person, whose objects represent
persons that are experts in a certain topic, where the topic in which they
are experts is a specific property of the class.
- A subclass of a class can itself have subclasses. For example, the class
Student derived from Person could have a subclass
WorkingStudent.
- Hence, using several derivations, it is possible to create hierarchies of
classes.
Next: The class Object
Up: Unit 08
Previous: Polymorphism