How to do this?
Design a java class named MyPoint to represent a point with x- and y-coordinates. The class contains:
Two data fields x and y that represent the x- and y-coordinates.
A no-argument constructor that creates a point (0, 0).
A constructor that constructs a point with specified coordinates.
Two get methods for data fields x and y, respectively.
A method named distance that returns the distance from this point to another point of MyPoint type.
A method named distance that returns the distance from this point to another point of MyPoint with specified x- and y-coordinates.
toString method that displays the coordinate of x and y.