Creating Interfaces
Some classes have a lot of implementation. They essentially stand alone like little programs—self-contained and rich in capabilities. anAccumulator is such a class.
Other classes provide a basic implementation for their descendants to extend in a general way. aTape is such a class.
Still others are designed to leverage virtual functions so that a specific feature can be extended or changed. anExternalInterface is such a class. It calls on certain of its own member functions that are intended to be overridden or extended by a descendant class.
Finally, some classes declare functions, but do not implement them, leaving implementation to their descendants. Such classes, often called interfaces or abstract classes, are intended ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access