Course Hive
Search

Welcome

Sign in or create your account

Continue with Google
or
Composition Is Better Than Inheritance in Python
Play lesson

Software Design in Python - Composition Is Better Than Inheritance in Python

4.0 (1)
31 learners

What you'll learn

This course includes

  • 31.5 hours of video
  • Certificate of completion
  • Access on mobile and TV

Summary

Keywords

Full Transcript

💡 Learn how to design great software in 7 steps: https://arjan.codes/designguide. In this video, I explain the difference between composition vs inheritance, what the design principle "favor composition over inheritance" means in practical terms, and how you can use it to make better software design decisions. The code I worked on in this video is available here: https://github.com/ArjanCodes/2021-composition-vs-inheritance 🎓 ArjanCodes Courses: https://www.arjancodes.com/courses. 💬 Join my Discord server: https://discord.arjan.codes. ⌨️ Keyboard I’m using: https://amzn.to/49YM97v. 🔖 Chapters: 0:00 Intro 1:11 Explanation of the example 3:57 Technique #1: inheritance 8:30 Problems with the inheritance technique 10:02 Technique #2: composition 18:48 Improvement: turn Commission into an abstract class 20:03 Limitations of this example 21:29 Final thoughts #arjancodes #softwaredesign #python

Course Hive

Continue this lesson in the app

Install CourseHive on Android or iOS to keep learning while you move.

Related Courses

FAQs

Course Hive
Download CourseHive
Keep learning anywhere