public class Circle
{   /*
    A class that models Circles by storing the coordinates for
    the center of the circle and the circle's radius
    */
   
    private Point myCenter;
    private double dMyRadius;
    
    /* pre: none
     * post: create a circle centered at the origin with radius = 1
     */
    public Circle()
    {       init(0, 0, 1);    }
    
    /* pre: radius > 0
     * post: create a circle centered at the origin with radius set to value of parameter
     */   
    public Circle(double radius)
    {   init(0, 0, radius);   }

    /* pre: none
     * post: create a circle centered at specified point and a radius = 1
     */
    public Circle(double x, double y)
    {   init(x, y, 1);  }
    
    /* pre: radius > 0
     * post: create a circle centered at specified point 
     *  and a radius set to the value of parameter
     */
    public Circle(double x, double y, double radius)
    {   init(x, y, radius); }

    /* pre: radius > 0
     * post: create a circle centered at specified point 
     *  and a radius set to the value of parameter
     */
    public Circle(Point center, double radius)
    {   init(center, radius);   }

    /* pre: none
     * post: create a circle centered at specified point and a radius = 1
     */   
    public Circle(Point center)
    {   init(center, 1);}
    
    private void init(double x, double y, double radius)
    {   myCenter = new Point(x,y);
        dMyRadius = radius;
    }
    
    private void init(Point center, double radius)
    {   myCenter = center;
        dMyRadius = radius;
    }
    

    
    /* pre: none
     * post: return the area of this Circle
     */
    public double getArea()
    {   return Math.PI * dMyRadius * dMyRadius; }

    /* pre: none
     * post: return the x coordinate of this Circle
     */   
    public double getX()
    {   return myCenter.getX();}

    /* pre: none
     * post: return the y coordinate of this Circle
     */       
    public double getY()
    {   return myCenter.getY();        }

    /* pre: none
     * post: return the radius of this Circle
     */   
    public double getRadius()
    {   return dMyRadius;}
    
    /* pre: radius > 0
     * post: rset the radius of this circle to radius, getRadius() = radius
     */   
    public void setRadius(double radius)
    {   dMyRadius = radius;}

    /* pre: none
     * post: return a String with information about this Circle
     */   
    public String toString()
    {   return "x: " + getX() + ", y: " + getY() + ", radius: " + getRadius();}
    
    
}
