using namespace std;

#ifndef _Circle_hpp_
#define _Circle_hpp_

#define pi 3.14159265

class Circle{
      private:
              double center_x;
              double center_y;
              double radius;      
      public:
             Circle()
             {
                     center_x = 0;
                     center_y = 0;
                     radius   = 0;                                          
             }
             Circle (double x, double y, double r)
             {
                    if (r < 0.0) 
                    {
                       cout << " Error: Negative radius\n";
                       center_x = 0;
                       center_y = 0;
                       radius   = 0;
                    }
                    else
                    {
                       center_x = x;
                       center_y = y;
                       radius   = r;
                    }
             }
             
             void set(double x, double y, double r)
             {
                    center_x = x;
                    center_y = y;
                    radius   = r;
             }
             
             Circle copy(Circle c)
             {
                    center_x = c.center_x;
                    center_y = c.center_y;
                    radius   = c.radius;
                    
                    return (*this);
             }
             
             Circle operator= (Circle c)
             {
                    center_x = c.center_x;
                    center_y = c.center_y;
                    radius   = c.radius;
                    
                    return (*this);
             }

             bool operator== (Circle c)
             {
                    return (center_x == c.center_x &&
                            center_y == c.center_y &&
                            radius   == c.radius);
             }
             
             double area()
             {
                    return (pi*radius*radius);
             }
                     
             void printc()
             {
                    cout << " Center: (x,y) = ";
                    cout << "(" << center_x << "," << center_y << ")";
                    cout << " radius = " << radius << endl;
             }
};

#endif
