关于C++的两道编程题,有没有大佬愿意帮助一下一个大一小白

图片说明

class Point{
public:
Point();
Point(int x, int y);
voidsetPoint(int x, int y);
int getx();
int gety();
private;
int x, y;
}

Point::Point(){x = y = 0;}
Point setPoint(int _x, int_y){x = _x; y = _y;}
Point::Point(int _x, int _y){setPoint(_x, _y);}
Point::getx(){return this->x;}
Point::gety(){return this->y;}

class Rectangle
{
Point a, b
friend int getSpace();
}

getSpace(Rectangle r)
{
return abs((Rectangle.a.getx() - this->b.getx()) * (Rectangle.a.gety() - this->b.gety()))
}

题目已经很详细了,几乎等于都告诉你怎么写了