//【纯手敲】
//Point类
class Point
{
private:
double x; //横坐标
double y; //纵坐标
public:
Point(double a = 0,double b = 0) //构造函数
{
x = a;
y = b;
}
double GetX() //返回横坐标
{
return x;
}
double GetY() //返回纵坐标
{
return y;
}
void Change(double a,double b) //改变坐标值
{
x = a;
y = b;
}
};
//普通函数Area
double Area(Point p,Point q)
{
double dx = p.GetX() - q.GetX();
double dy = p.GetY() - q.GetY();
return 3.14159 *(dx*dx+dy*dy);
}