 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| • |
Abstract
base classes can help with this issue
|
|
|
|
– |
Because
if the methods from them are ever directly called
|
|
|
you
will find out immediately that something is wrong
|
|
|
|
– |
The
intent, as with C++, is to create a common interface
|
|
|
|
– |
So
that the derived classes can express their uniqueness!
|
|
|
|
– |
All
derived class methods that match the signature of the
|
|
|
base
class will be called using dynamic binding
|
|
|
|
– |
This
is created by making one or more abstract methods in
|
|
the
base class:
|
|
|
|
abstract
void func(); //with no body
|
|