import java.awt.geom.Point2D; public interface Surface { /** test if the surface contains the point p. */ public boolean contains(Point2D p); /** * test if it is possible to go from the point p1 to the point p2 using a * straight line and without going outside the surface. Throw an exception * IllegalArgumentException if p1 or p2 are not in the surface. */ public boolean areConnected(Point2D p1, Point2D p2); }