2016-12-28 外观模式 + 适配器模式+迪米特法则+依赖倒转原则
2016-12-28 外观模式 + 适配器模式+迪米特法则+依赖倒转原则+里氏替换原则 1:class、2:stock(|st?k| n 存活、股票)、3:public、4:void(|v??d|)n 空白、无效的、空的、5:sell、6:console(|k?n?s??l| n 控制面板、控制台)、write、7:national(|?n???nl| adj 国家的、全国性的)、8:debt |det|、9:national debt[?n???n?l d?t] n 国债、10:realty [?ri?lti] n 不动产、11:static、12:main、13:argument [?ɑ:rgjum?nt] n 论据;争论,争吵; 主题,情节、14:fund |f?nd| n 基金 子系统类集合 SubSystem Classes True or false,Adapters can only wrap(|r?p| v 包,用…包 n外衣、披肩、围巾、毯子) one object : false. An Adapter converts(convert v 转变 改装) an interface. Adapter with two roles(role |r??l| n 角色、作用):two-way(adj 双向的). Adapter(适配器) client uses the target interface. Decorator(|?dek?re?t?(r)| n 装饰者) called Adapter this : simple pass through. A decorator(|?dek?re?t?(r)| noun 室内装潢工) adds new behavior(|b??he?vj?(r)| n 行为). One advantage(|?d??v?nt?d?|n有利条件 好处) of Facade: decoupling(decoupling [d?'k?pl??] n. 退耦(装置) v. 减弱(核爆炸)). Facade(|f??sɑ?d| noun正面 表面) still allows low level(|?levl|) access. A facade simplifies(simplify |?s?mpl?fa?| v简化 精简) an interface. Principle that wasn’t as easy as it sounded:least knowledge. Disadvantage(disadvantage |?d?s?d?v?nt?d?| noun不利条件) of the Principle of Least Knowledge:too many wrappers(wrapper |?r?p?(r)| n 包装材料、书封套). Least(|li?st|) Knowledge:talk only to your immediate friends. No movie is complete(|k?m?pli?t| adj 完整的、全部的) without this: popcorn. Ducks do it better than Turkeys(turkey |?t??ki| n 火鸡):fly. New American dream(two words):home theater(|?θ??t?(r)| noun 剧场). (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |