Question: In java please a. Using UML notation, design a class called Mypoint in Microsoft Word to represent a point in the x - and y-coordinates.
In java please

a. Using UML notation, design a class called Mypoint in Microsoft Word to represent a point in the x - and y-coordinates. The class contains: a. Two private double data field called x and y for x and y coordinate. b. A no-argument constructor to create the point (0,0). c. A constructor to create a Mypoint object with specified value for x and y. d. A method get X( ) to return x coordinate. e. A method gety() to return y coordinate f. A method distance() to return distance from this point to a specified point of type MyPoint. 9. A method distance() to return distance from this point to a specified point with x - and y coordinate. h. A static method distance() to return distance from two MyPoint objects. Note that distance() method in part f to h is an example of Overload. Also, from now on, all methods are public unless specified to be private. In addition, all data fields will be private unless required to be public. b. Implement your UML design in part (a) above in a Java class. Note: You can reuse code when defining the three overload of the distance methods. That is, do NOT duplicate same code in the said three methods. c. Write a test program that will create two points (0,0) and (10,30.5) and display distance between these two points. Display three distance value using each of the distance methods overloaded before
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
