/**
* This class defines an immutable (x,y) point in the plane.
*
* @author Michael Goodrich
*/
public class XYPoint {
private double x,y; // private instance variables for the coordinates
/**
* Construct an (x,y) point at a specified location.
*
* @param xCoor The x-coordinate of the point
* @param yCoor The y-coordinate of the point
*/
public XYPoint(double xCoor, double yCoor) {
x = xCoor;
y = yCoor;
}
/**
* Return x-coordinate value.
*
* @return x-coordinate
*/
public double getX() { return x; }
/**
* Return y-coordinate value.
*
* @return y-coordinate
*/
public double getY() { return y; }
}