/** * Shape127 * * This is the base class for the shape subclasses * you will develop for the CS127 assignment due * January 19, 2004. */ import java.awt.*; import javax.swing.*; import java.io.*; public class Shape127 { private Color color; public Shape127() { color = Color.black; } public Color getColor() { return color; } public void setColor( Color newColor ) { 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( BufferedReader in ) { } /** * Draws this shape in the given graphics environment. * * @param a graphics environment (usually the one passed * to the paint method of some window) */ public void draw( Graphics g ) { } /** * Returns the area (or a good estimate) of this shape. */ public double area() { return 0.0; } }