Rectangle类定义如下:
class Point{ //先定义一个坐标类
int x,y;
public:
void setPoint(int m,int n){x=m;y=n;}
int getx(){return x;}
int gety(){return y;}
};
class Rectabgle{
Point p1,p2;
public:
Rectangle(int,int,int,int); //构造函数
void getPoint(Point,int&,int&);//获取坐标
void calcu(Point,Point);//计算矩形面积
Rectangle(){cout