1. 简单工厂违背OCP(Open Close Principle)原则 , 即对增加开放,对修改关闭.如果要符合OCP原则,要针对接口编程. //简单工厂模式,违反了OCP原则 public class DAOFactory { public static IAddressDao getAddressDao() { return new AddressDao(); } public static IUserDao getUserDao() { return new UserDao(); } }…