import java.awt.*; /** An instance is a shape with a position. Expected to have subclasses */ public class Shape { public int x; // (x,y) is the upper-left corner public int y; // of the shape on the window /** Constructor: a shape at (xp, yp) */ public Shape (int xp, int yp) { x= xp; y= yp; } /** Yields: a descriptor of this Shape */ public String toString() { return "(" + x + ", " + y + ")"; } /** Draw this shape using Graphics g */ public void drawShape(Graphics g) { // Do nothing. } }