Abstract Base Class and Concrete Derived Class:
The base class that has one or more pure virtual functions is called the Abstract Base Class. These classes designed as a framework or layout for derived classes. An abstract base class cannot be instantiated, i.e. an object of its type cannot he defined. But, a pointer to an abstract base class can he defined.
The derived class that does not have any pure virtual function is called Concrete Derived Class. The pure virtual function of the Abstract Base Class is implemented in the Concrete Derived Class. The derived classes usually have their own versions of the virtual functions.
In Object Oriented Programming a hierarchy of classes is defined. The Abstract Base Class is defined at the top of this hierarchy. The Concrete Derived Classes are derived from the Abstract Base Class. The pure virtual functions are declared in the base class. Each derived class contains its own version of these pure virtual functions. In this way uniformity is achieved within the hierarchy of the class.
comment closed