1. 简单工厂模式(Simple Factory) 2. 工厂方法模式(Factory Method) 3. 抽象工厂模式(Abstract Factory)
接口对象=new 实现接口的类 ,这就是工厂模式