Lesson 18: Getting classy
Outline:
- Recap: Defining our own objects
self
and instance variables- example:
MultiSidedDie
__str__
method
- Bottom-up implementation
- unit testing
- test-driven development: Exercise 1, part a
- Example:
Map
class - Looking ahead
Explore after class:
- Test-driven development
- more types of tests: Exercise 1, parts b-d
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)