/**
 * An object of the Point class represents a point in the xy plane.
 * A point has an x coordinate and a y coordinate.
 *
 * Bugs:        none known
 **/
public class Point {

	////////////////////////////////////////
	// Data Members
	////////////////////////////////////////

	public static final double DEFAULT_X = 0.0;
	public static final double DEFAULT_Y = 0.0;
	
	private double x;             // the x coordinate
	private double y;             // the y coordinate

	/**
	 * Default Constructor -- Constructs a point at the origin (0, 0).
	 **/
	public Point () {
		x = DEFAULT_X;
		y = DEFAULT_Y;
	}

	/**
	 * Constructs a point with the given x and y coordinates.
	 * @param xValue the x coordinate 
	 * @param yValue the y coordinate
	 **/
	public Point (double xValue, double yValue) {
		x = xValue;
		y = yValue;
	}

	////////////////////////////////////////
	// Accessor Methods
	////////////////////////////////////////
        
	/**
	 * Returns the x coordinate.
	 * @return the x coordinate
	 **/
	public double getX () { 
		return x; 
	}
        
	/**
	 * Returns the y coordinate.
	 * @return the y coordinate
	 **/
	public double getY () { 
		return y; 
	}

	////////////////////////////////////////
	// Mutator Methods
	////////////////////////////////////////
        
	/**
	 * Sets the x coordinate to the given value.
	 * @param newX the new x coordinate
	 **/
	public void setX (double newX) { 
		x = newX; 
	}
        
	/**
	 * Sets the y coordinate to the given value.
	 * @param newY the new y coordinate
	 **/
	public void setY (double newY) { 
		y = newY; 
	}

	////////////////////////////////////////
	// Class Methods
	////////////////////////////////////////
	
	/**
	 * Describes the point class
	 **/
	public static void describeClass () {
		System.out.println("An object of the Point class represents ");
		System.out.println("a point in the xy plane.  A point has an ");
		System.out.println("x coordinate and a y coordinate.");
	}

} // end Point class
