class point{
float x;
float y;
public:
point(float px=0,float py=0) :x(px), y(py){}
};
class Rectangle:public point
{
public:
Rectangle(){};
Rectangle(float px, float py, float pl, float pw) :point(px, py), Length(pl), Width(pw){};
float Area(){
return Length*Width;
};
~Rectangle();
private:
point p;
float Length, Width;
};
class Circle:public point
{
public:
Circle(float px, float py, float r) :point(px, py), R(r){};
~Circle();
private:
point p;
float R;
};
class Cuboid:public Rectangle ,public Circle
{
public:
Cuboid();
~Cuboid();
void Vol(){ };//计算体积的函数Vol(),显示矩形坐标(X,Y)
void Show();//长方体的长、宽、高与体积的函数Show()
private:
float High, Volume;
};
Cuboid::Cuboid()
{
}
void main()
{
Rectangle cub;
}
“再定义描述圆的类Circle,其数据成员为圆的中心坐标(X,Y)与半径R,其成员函数为构造函数”
这个的成员函数有哪些?