下列代码,使用的设计模式是 interface Shape { void draw(); } class Rectangle implements Shape { @Override public void draw() { System.out.println("Rectangle::draw()"); } } class Square implements Shape { @Override public void draw() { System.out.println("Square::draw()"); } } public class ShapeMaker { private Shape rectangle; private Shape square; public ShapeMaker() { rectangle = new Rectangle(); square = new Square(); } public void drawRectangle(){ rectangle.draw(); } public void drawSquare(){ square.draw(); } }