#include #include #include class Point { public: double x1,x2,y1,y2; public: void setPoint(double a1,double a2,double b1,double b2) { x1=a1; y1=a2; x2=b1; y2=b2; } void showPoint() { cout << "\n Point 1 X1 and Y1 values: " << x1 << "\t" << y1 ; cout << "\nPoint 2 X2 and Y2 values: " << x2 << "\t" << y2 ; } void dist() { int x = pow((x2- x1), 2); int y = pow((y2- y1), 2); int dtn = sqrt(x + y); cout<<"\nGiven Two Points Distance="<< dtn; } void check() { if((x1 == x2) && (y1 == y2)) cout << "\nPoint 1 and Point 2 are equal." << endl; else cout << "\nPoint 1 and Point 2 are not equal." << endl; } }; int main() { clrscr() ; Point P; P.setPoint(1.0,2.0,4.0,3.0); P.showPoint(); P.dist(); P.check(); getch() ;