Given the code below, add a Circle class that inherits from Shape and has a single private data member double m_Radius and a method void setRadius(double r) (which sets m_Area). Are there any changes that should be made to the Shape class?
#include <iostream>
using std::cout;
class Shape {
private:
double m_Area;
public:
Shape(): m_Area(0.0) { }
Shape( double area) : m_Area( area) { }
void setArea( double a){ m_Area = a; }
double getArea(){ return m_Area; }
};
int main(){
Circle cir;
cir.setRadius(5.0);
cir.print();
return 0;
}