1.创建Shape接口
2.创建Rectangle、Square、Circle等具体的类
3.创建Color接口
4.创建Red,Yellow等具体的类
5.创建抽象工厂
public abstract class AbstractFactory{
abstract Color getColor(String Color);
abstract Shape getShape(String shape);
}
6.创建具体的ShapeFactory实现getShape方法
7.创建具体的ColorFactory实现getColor方法