import nokta;

public class daire1
{
    protected double yaricap;
    protected nokta merkez;

    public daire1()
    {
        merkez=new nokta(0,0);
        yaricapgir(0);
    }

    public daire1(double r, double a, double b)
    {
        merkez=new nokta(a,b);
        yaricapgir(r);
    }

    public void yaricapgir(double r)
    {
        if(r >= 0.0)
            yaricap=r;
        else
            yaricap=0.0;
    }

    public double yaricapoku()
    {
        return yaricap;
    }

    public double alan()
    {
        return 3.14159*yaricap*yaricap;
    }

    public String toString()
    {
        return "Merkez = "+"["+merkez.x+","+merkez.y+"]"+
        "; Yaricap="+yaricap;
    }
}


