public class Point extends GeometricObject { protected double x, y; public Point(double x, double y) { this.x = x; this.y = y; } public double distTo (Point p) { return Math.sqrt(Math.pow(this.x-p.x,2)+Math.pow(this.y-p.y,2)); } public double area() { return 0; } public double getX() { return this.x; } public double getY() { return this.y; } } // Local Variables: // c-basic-offset: 4 // compile-command: "javac *.java; java TestQuad" // End: