/** Represents a point in 2D */ class Point { /** The x and y coords */ public double x; public double y; /** The constructor */ public Point(double x1, double y1) { x = x1; y = y1; } /** Set the x-coord of the Point */ public void setX(double x1) { x = x1; } /** Set the y-coord of the Point */ public void setY(double y1) { y = y1; } /** Return x,y as a string*/ public String toStr() { String sx = String.valueOf(x); String sy = String.valueOf(y); return sx + "," + sy; } } // End class Point