Object Oriented Programming 원칙 (5) - 조합(composition)
조합 Composition Composition 은 왜 필요할까? ( Inheritance vs Composition ) You’ll quickly get a rather deep and wide inheritance. You may end up with a deep class hierarchy some days. One change from the upper-class may destroy all the below classes. The moment you decide to inherit from another class, that’s time you tie your class to it. You’re never sure what the superclass is going to do as it’s ou..
개발/python-객체지향프로그래밍(OOP)
2022. 5. 20. 22:12