步骤一: 定义IAbstractFactory 接口(超级工厂) package AbstractFactory; /** * @program: MyFactory * @ClassName IAbstractFactory * @description: * @author: hc * @create: 2020-03-19 21:05 * @Version 1.0 **/ public interface IAbstractFactory { Car getCar(); IBreakFast getBreakFast(); } 步骤二: 定义汽车接口(子工