We continue our discussion on subclassing , i.e., extending an existing class in order to get a new class that has behaviors modified from those of the existing class.
We continue with the class
Shape
and its subclasses that we started last lecture. This time, we will consider the design choices regarding the (overridden)
draw
methods, class attributes, and methods to support different kinds of comparison between objects.
Slides:
individual slides for viewing
,
6-up layout for printing
Examples:
__eq__
Questions and Answers: here .
Link to Lecture Recording