Basics

  • Inheritance could be brittle (a change may require changes elsewhere)
  • Decoupled code could work independently or interactively
  • classes interactions will work with an interface
  • Not checking types: polymorphic and Pythonic

Here is an example for inheritance and composition working together:

 

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。