Pure Virtual function-Abstract class

Let us try to understand pure virtual function with the help of an example. #include <iostream>using namespace std;class shape {public:    virtual void calculateArea() {}};class rectangle: public shape {public:    void calculateArea() {        cout << “Rectangle Area calculation” << endl;    }}; In the above example, calculateArea function is overridden in rectangle class. In shape class, definition is empty since shape class does not know what to calculate. Can we say that empty definition of calculateArea function in shape class is not required. Instead, anyone who inherit shape class must redefine or override…