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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值