Students who complete this unit will demonstrate that they can:
- Describe the motivation for object-oriented programming, particularly encapsulation
- Create new kinds of objects by defining classes
- Specify and enforce class invariants
- Use dot-notation to access class attributes
- Compare and contrast functions and methods
- Use instantiation to create instances of a class
- Use
self
to create attributes (variables and
methods)
- Recognize and define special methods using
double-underscores
- Distinguish between class and instance attributes
- Create explicit value constructors using parameters and
default parameter values
- Recognize a Python method that is not intended to be used
outside of a class
- Perform class customizations (e.g. __str__, __lt__, __eq__,
etc.)
- Create and use operator overloading