/*
 * Created on Feb 11, 2005
 *
 * To change the template for this generated file go to
 * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
 */

/**
 * @author narayans
 *
 * To change the template for this generated type comment go to
 * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
 */
public class Point {
	int _xcoord;
	int _ycoord;
	
	

	/**
	 * @return Returns the _xcoord.
	 */
	public int get_xcoord() {
		return _xcoord;
	}
	/**
	 * @param _xcoord The _xcoord to set.
	 */
	public void set_xcoord(int xcoord) {
		_xcoord = xcoord;
	}
	/**
	 * @return Returns the _ycoord.
	 */
	public int get_ycoord() {
		return _ycoord;
	}
	/**
	 * @param _ycoord The _ycoord to set.
	 */
	public void set_ycoord(int ycoord) {
		_ycoord = ycoord;
	}
	
	public double distanceFrom(Point other) {
		double xDistance = Math.pow(_xcoord - other._xcoord, 2);
		double yDistance = Math.pow(_ycoord - other._ycoord, 2);
		
		double distance = Math.sqrt(xDistance + yDistance);
		return distance;
	}
}
