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ˈʊl| n 控制面板、控制檯)、write、7:national(|ˈʃənl| adj 國家的、全國性的)、8:debt |det|、9:national debt[ˈʃə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əˈː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 劇場).

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章