19.7 TAXONOMY OF CLASSES

We may now try for classification of classes! We can categorize various classes we use in our programs. So far we have seen only two types, i.e. abstract and normal (meaning non-abstract). The other types are basically used by advanced programmers. We will discuss them simply as introduction.

Abstract

An abstract class is developed with the sole idea that it will be used as base for other derived classes. Therefore, it is sometimes referred as Abstract Base Class. Please note that there is no keyword abstract. Only a presence of pure virtual function makes a class abstract. The derived class has the responsibility to define each and every virtual method of the base class.

Concrete

One simple definition of a concrete class ...

Get Object Oriented Programming with C++, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.