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 剧场).