#include <iostream>
#include <math.h>
using namespace std;
class Point
{
private:
double x;
double y;
public:
Point(){x=0;y=0;}
Point(double tx,double ty){x=tx;y=ty;}
Point(Point &tp):x(tp.x),y(tp.y){};
double GetX(){return x;}
double GetY(){return y;}
void P_display();
};
class Line:public Point
{
private:
Point p2;
double length;
public :
Line(Point tp1,Point tp2):Point(tp1),p2(tp2){};
void Len();
void L_display();
};
int main()
{
Point p1(1,3);
Point p2(2,3);
Line l1(p1,p2);
l1.L_display();
}
void Point::P_display()
{
cout<<"Point:("<<GetX()<<","<<GetY()<<")"<<endl;
}
void Line::Len()
{
double x1,x2,y1,y2;
x1=GetX();
y1=GetY();
x2=p2.GetX();
y2=p2.GetY();
length=sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
}
void Line::L_display()
{
P_display();
p2.P_display();
Len();
cout<<"length="<<length<<endl;
}