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.

Lecture Prep

Review: the slides and your notes from last lecture and perhaps Section 18.7 on Inheritance from the textbook.


Lecture materials

Slides: individual slides for viewing , 6-up layout for printing

Examples:

Questions and Answers: here .

Link to Lecture Recording