Lesson 21: A classy family tree

Outline:

  1. Recap: dict type
  2. Features of object-oriented design
    • encapsulation
    • polymorphism
    • inheritance
  3. Inheritance
    • parent and child classes (aka superclasses and subclasses)
    • Exercise 1: exploring graphics.py
    • is-a versus has-a

Explore after class:

  1. More practice working with dictionaries
    • example: finding the key with the highest value (check Slack)
  2. 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)