#include <iostream>
#include <cmath>
using namespace Std;
Class point{
Private
Double x, y;
Public
Point ();
Point (double xv,double yv);
Point (point& PT);
Double Getx ();
Double Gety ();
};
Point::P oint () {
x=0;y=0;
}
Point::P oint (double xv,double yv) {
X=XV;Y=YV;
}
Point::P oint (point& PT) {
This->x = Pt.x;
This->y = Pt.y;
}
Double Point::getx () {
return x;
}
Double Point::gety () {
return y;
}
Class Circle:public point{
Public
Circle (double x,double y,double R);
Circle ();
Circle (Circle &);
int position (point &pr) {
Double A = POW (Pr.getx ()-This->getx (), 2) + POW (pr.gety ()-This->gety (), 2);
if (a==r*r) return 0;
if (a>r*r) return 1;
if (a<r*r) return-1;
}
Private
Double R;
};
Circle::circle (double x,double y,double R): Point (x, y) {
this->r=r;
}
Circle::circle (): Point () {
r=0;
}
Circle::circle (Circle &t): Point (T.getx (), t.gety ()) {
R = T.R;
}
Class Rectangle:public point{
Public
Rectangle (double x,double y,double len,double wid): Point (x, y) {
this->len=len;
this->wid=wid;
}
Rectangle ();
Rectangle (Rectangle &);
int position (point &pr) {
Double A = Pr.getx ()-This->getx ();
Double b = pr.gety ()-this->gety ();
cout<<a<< "KKKK" <<b<<endl;
if ((a==0&&b<=wid&&b>0) | | | (a>0&&a<=len&&b==0) | | (a==len&&b<=wid&&b>0) | | (A>0&&a<=len&&b==wid)) return 0;
if (a<len&&a>0&&b<wid&&b>0) return-1;
else if (a>len| | b>wid| | a<0| | B<0) return 1; Wai
else return 0; Zai
}
Private
Double Len;
Double wid;
};
Rectangle::rectangle (): Point () {
Len=1;
wid=1;
}
Rectangle::rectangle (Rectangle &t): Point (T.getx (), t.gety ()) {
len = T.len;
WID = T.wid;
}
. Circle and Rectangle