在面向对象设计中,什么是组合优于继承(Composition over Inheritance)原则?
优先使用组合而不是继承来实现代码复用
通过接口组合对象的功能
继承使代码更灵活
组合使代码更易于维护