to anyone who can help me out with this its of no big importance i was stumbling one day and this came across this little snit bit of what looks to be like a program or something so i tried starting it and i have no idea whats going on with it lol and i took java in school lol anywho im tired of it bugging me so if any one could give me a hand that would be great thank you........
Fully implement the class named Point with private members of type double called X and Y. Each Point shall represent a point in the Cartesian co-ordinate system.
The class should have the public operation called distance which takes an object of class point as a parameter and returns a double representing the distance between the two points.
Write a small driver application which prompts the user for the X and Y values of 4 points from the keyboard, outputs the points, and outputs the distances between each of the 4 points.
X and Y values shall be prompted for one at a time.
Duplicate Points, that is, Points with the exact same X and Y values are disallowed. If the user enters values for an existing points, display an error message and prompt again. Note: both the X AND Y values must be the same for a duplicate Point .
Your main program shall output the distances between each set of points using the distance method. Duplicate distances are not allowed. (ie if the distance from pt1 to pt2 is output, the distance from pt2 to pt2 should not be output).
Hint: There are more than 4 possible distances.
Note: points may be in anywhere in the cartesian co-ordinate system. That is, X and/or Y values may be negative or positive.
-Create a default, and non-default constructor.
-Create a toString method that outputs that point's information.