// Our first class!
// A Point is an object that has an x and y coordinate that 
// can be manipulated in various ways.  This class is a blueprint
// for creating Point objects.

public class Point {
	int x;
	int y;
	
	public Point(int startx, int starty) {
		x = startx;
		y = starty;
	}
	
	public Point() {
		x = 0;
		y = 0;
	}
	
	public void translate(int dx, int dy) {
		x += dx;
		y += dy;
	}
	
	public double distanceFromOrigin() {
		return distance(new Point());
	}
	
	// Sample call: p1.distance(p2)
	public double distance(Point p) {
		return Math.sqrt(Math.pow((x - p.x), 2) + Math.pow((y - p.y), 2));
	}
}
