 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| • |
When
a class is derived from one base class, it is called
|
|
|
single
inheritance.
|
|
|
| • |
In
this figure, the base class is account.
|
|
|
| • |
All
classes are derived from this class, either directly or
|
|
indirectly.
|
|
|
| • |
checking
is also a base class of the student class, since
|
|
|
student
is derived from it.
|
|
|
| • |
This
makes account an indirect
|
|
|
base class of student.
|
|
|
| • |
Notice
how single inheritance
|
|
|
has a tree-like structure.
|
|