 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| • |
Static
binding guarantees that we will never associate a
|
|
|
member
function of a derived class with an object of a
|
|
|
direct
or indirect base class.
|
|
|
| • |
If
that were to happen, the member function would
|
|
|
attempt
to access data members that do not exist in the
|
|
|
object.
That is because a base class object does not have
|
|
|
an
"is a" relationship with a derived class object.
|
|
|
| • |
Of
course, we can go the other way around. That is, we
|
|
|
can
associate a member function of a direct or indirect
|
|
|
base
class with an object of a derived class as long as that
|
|
member
function is accessible (i.e., public).
|
|
|
| • |
That
is what inheritance is all about and it works because
|
|
|
we
have an "is a" relationship.
|
|