使用继承的的方式,缺点是添加功能是,上下层都需要改变; 同时为了避免为外界透露细节; 松耦合,避免两者出现静态的联系; 有接口和实现如下: public interface ITest { void A(); void B(); }[......]继续阅读

2020年5月8日 0条评论 3202点热度 0人点赞 痴者工良 阅读全文

Using inheritance has the drawback that adding functionality requires changes in both the upper and lower layers. At the same time, it is necessary to[......] 继续阅读

2020年5月8日 0条评论 84点热度 0人点赞 痴者工良 阅读全文