Lesson 21: A classy family tree
Outline:
- Recap:
dict
type- Exercise from last time: practice with
dict
s
- Exercise from last time: practice with
- Features of object-oriented design
- encapsulation
- polymorphism
- inheritance
- Inheritance
- parent and child classes (aka superclasses and subclasses)
- Exercise 1: exploring
graphics.py
- is-a versus has-a
Explore after class:
- More practice working with dictionaries
- example: finding the key with the highest value (check Slack)
- Reading code with inheritance
Reading assignment (to be completed by the next class):
- Zelle chapter 12 (pp. 419-456) - especially sec. 12.4-12.5 (pp. 451-456)