FileDocCategorySizeDatePackage
RectangularShape.javaAPI DocExample414Wed Apr 20 14:52:10 BST 2005None

RectangularShape.java

// Here is a basic interface. It represents a shape that fits inside
// of a rectangular bounding box. Any class that wants to serve as a 
// RectangularShape can implement these methods from scratch. 
public interface RectangularShape {
    void setSize(double width, double height);
    void setPosition(double x, double y);
    void translate(double dx, double dy);
    double area();
    boolean isInside();
}