Skip to main content
Loading page…
Python Mastery
Chapter 12
Lesson 4 of 4
Designing with Objects
Contents
Notes
Tutor
Concept
Composition vs Inheritance: The Core Tradeoff
Loading activity…
Previous
1 / 7
Continue
Contents
Notes
Discussion
Tutor
30 min
7 activities
0 of 7 done
In this lesson
1
Composition vs Inheritance: The Core Tradeoff
2
Assigning Responsibilities: A Deck of Cards
3
Single Responsibility Principle
4
Deck of Cards Object Relationships
5
OOP Design Quiz
6
Model a Library Domain
7
Design Justification
Objectives
Articulate when to prefer composition over inheritance using the has-a vs is-a test
Model a small real-world domain (a deck of cards) as a set of cooperating objects
Assign clear responsibilities to each class and identify which class owns which behaviour
Apply SOLID principles at a basic level to critique and improve an OOP design
Chapter 12 · Object-Oriented Programming
Classes & Instances
Attributes, Methods & Encapsulation
Inheritance & super()
Designing with Objects
Previous: Inheritance & super()
Next: Objects, Identity & References