“常用公式”在线计算,“设计手册”在线查询
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享分享 分享淘帖 支持支持 反对反对

共 1 个关于本帖的回复 最后回复于 2013-8-16 16:54

沙发
陈西 八品司务 发表于 2013-8-16 16:54:40 | 只看该作者
研发埠培训中心
Delegation  is an alternative to inheritance. Delegation means that you include an  instance of another class as an instance variable, and forward messages to  the instance. It is often safer than inheritance because it forces you to  think about each message you forward, because the instance is of a known  class, rather than a new class, and because it doesn't force you to accept  all the methods of the super class: you can provide only the methods that  really make sense. On the other hand, it makes you write more code, and it is  harder to re-use (because it is not a subclass).
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关注我们

360网站安全检测平台