//1.设计一个基类,从基类派生圆柱,设计成员函数输出它们的面积和体积; #include < iostream > using namespace std; class Basic//基类 { protected: double r; public: Basic() { r = 0; } Basic(double a) :r(a) {} }; class Circular : public Basic//从基类派生圆类 { protected: double area...
//1.设计一个基类,从基类派生圆柱,设计成员函数输出它们的面积和体积; #include < iostream > using namespace std; class Basic//基类 { protected: double r; public: Basic() { r = 0; } Basic(double a) :r(a) {} }; class Circular : public Basic//从基类派生圆类 { protected: double area...