class point;
class shape {
public:
virtual double circumference() = 0;
virtual double area() = 0;
};
#define PI 3.14159
class circle : public shape {
private:
point center;
int radius;
public:
circle(const point &p, int r) : center(p), radius(r) {}
virtual double circumference() { return 2 * PI * radius; }
virtual double area() { return PI * radius * radius; }
};
class rectangle : public shape {
private:
point upleft;
int width, height;
public:
rectangle(const point &p, int w, int h) : upleft(p), width(w), height(h) {}
virtual double circunference() { return 2 * (width + height); }
virtual double area() { return width * height; }
};