Hello everyone i am stuck on this assignment can someone help
Ask the user to input four pairs of x,y coordinates in this format:
x0 y0 x1 y1 x2 y2 x3 y3
Use the SimplePoint class below and add a main() method to it. The main() method should create a SimplePoint object for each pair of x,y coordinates. Next, it should determine which of the four points is furthest from point 0,0. Finally, the main() method should output the x,y coordinates of the furthest point, along with the distance. Match the sample run below.
Here is the SimplePoint class:
public class SimplePoint {
private double x,y;
public SimplePoint(double x1, double y1) {
x = x1;
y = y1;
}
public double getX() { return x; };
public double getY() { return y; };
public double distance(SimplePoint p) {
return Math.sqrt( Math.pow(p.getX()-x,2) + Math.pow(p.getY()-y,2) );
}
}