《重构:改善既有代码的设计》中提到过一些代码的坏味道,针对这些坏味道,需要进行重构。 被拒绝的遗赠 refused bequest 问题1:子类复用了超类的行为(实现),却不愿意支持超类的接口 解决方案:使用replace inheritance with delegation 来解决