import nokta;

public class dogru
{
    protected nokta n1,n2;

    //kurucu metod metot girdisi x1,y1,x2,y2
    public dogru(double x1, double y1,double x2,double y2)
    {
        n1=new nokta(x1,y1);
        n2=new nokta(x2,y2);
    }

    //kurucu metod, method girdisi iki nokta
    public dogru(nokta nokta1,nokta nokta2)
    {
        n1=new nokta(nokta1.x,nokta1.y);
        n2=new nokta(nokta2.x,nokta2.y);
    }

    public void dogrugir(double x1, double y1,double x2,double y2)
    {
        n1.noktagir(x1,y1);
        n2.noktagir(x2,y2);
    }

    public String toString()
    {
        return "("+n1.toString()+","+n2.toString()+")";
    }

    public double boy()
    {
    return Math.sqrt((n1.Xoku()-n2.Xoku())*(n1.Xoku()-n2.Xoku()) +
                     (n1.Yoku()-n2.Yoku())*(n1.Yoku()-n2.Yoku()) );
    }
}
