Classes and Objects
An object is something that has attributes and/or behaviors, meaning it is certain ways and does certain things. In the real world, everything could be considered an object. Some objects are tangible, like rocks, trees, tennis racquets, and tennis players. And some objects are intangible, like words, colors, tennis swings, and tennis matches.
Lessons
Lab : Exercises in this Lesson
Adding a roll() Method to Die
Properties
Documenting the Die Class
Extending to Die Class
Extending the roll() Method
After completing this module, students will be able to:
Create classes and objects in Python.
Write instance methods, class methods, and static methods.
Define properties.
Create subclasses using inheritance.
Create abstract classes.
Appropriately document Python classes.
Understand how decorators work.