示例#1
0
  /**
   * this method is implemented directly in basic shapes in complex shapes this method is
   * implemented using delegation
   */
  public void renderShapeToScreen() {
    System.out.println("Rectangle: renderShapeToScreen");
    for (Shape s : rectangleEdges) {

      // delegate to child objects
      s.renderShapeToScreen();
    }
  }