# 组合优于继承
reference
摘自: "Design Patterns: Elements of Reusable Object-Oriented Software" 一书
Program to an interface, not an implementation.(面向接口编程)
Favor object composition over class inheritance.(尽量选择对象组合的设计方式)
reference
摘自: "Design Patterns: Elements of Reusable Object-Oriented Software" 一书
Program to an interface, not an implementation.(面向接口编程)
Favor object composition over class inheritance.(尽量选择对象组合的设计方式)
4/26/2023, 2:53:09 AM
自由转载-非商用-禁止演绎-保持署名(CC BY-NC-ND 4.0)
https://mrzhouzh.github.io/post/2023/04/25/compositionoverinheritance.html