Object Oriented Programming20805 marksOperator functions as a class members
Create a class named Point with data members x(int) and y(int). Add operator overloading to find the Euclidean distance between two points.
Create a class named Point with data members x(int) and y(int). Add operator overloading to find the Euclidean distance between two points. [5]
Operator overloading allows us to redefine the behavior of an operator for user-defined types (classes). Here, we overload the - operator (or a suitable operator) to compute the Euclidean distance between two Point objects. The Euclidean distance formula between two points P1(x1, y1) and P2(x2, y...