Lesson 18: Getting classy

Outline:

  1. Recap: Defining our own objects
    • self and instance variables
    • example: MultiSidedDie
    • __str__ method
  2. Bottom-up implementation
  3. Example: Map class
  4. Looking ahead

Explore after class:

  1. Test-driven development

Reading assignment (to be completed by the next class):

  • Error handling: Zelle section 7.4 (pp. 223-227)
  • Bottom-up implementation and unit testing: Zelle section 9.4 (pp. 301-303)
  • Defining classes: Zelle sections 10.2-10.5 (pp. 314-336)