What are the four classification of heredity characters?
TYPES OF INHERITANCEThe mechanism of deriving a new class from an old one is called inheritance. The old class is referred to as the base class and the new one is called the derived class or subclass. Inheritance is a mechanism of reusing and extending existing classes without modifying them, thus producing hierarchical relationships between them. C++ supports the following inheritance.(a).Single InheritanceA derived class with only one base class is called single inheritance.#include using namespace std;class BaseClass {int i;public:void setInt(int n);int getInt();};class DerivedClass : public BaseClass {int j;public:void setJ(int n);int mul();};void BaseClass::setInt(int n){i = n;}int BaseClass::getInt(){return i;}void DerivedClass::setJ(int n){j = n;}int DerivedClass::mul(){return j * getInt();}int main(){DerivedClass ob;ob.setInt(10); // load i in BaseClassob.setJ(4); // load j in DerivedClasscout