/** * Shape127 * * This is the base class for the shape subclasses. */ import java.awt.*; import java.util.*; public interface Shape127 { Color getColor(); void setColor(Color newColor); /** * Reads the subclass-specific data from the specified * input source, and stores the data in appropriate * fields. The load method of a Circle subclass, for * example, would read and store the x-coordinate of the * center, the y-coordinate of the center, and the radius. * * @param an open input source whose next bytes * describe a shape of the same type as this class */ public void load(Scanner in); /** * Draws this shape in the given graphics environment. * * @param a graphics environment (usually the one passed * to the paintComponent method of some panel) */ public void draw(Graphics g); }