“91974˙CH12˙final” 2012/12/14 14:37 page 393 #1
CHAPTER
12
Your Father Was a Rectangle
12.1 Objectives
To introduce the concept of inheritance
To create a working object-oriented graphics package
To provide another example of object-oriented design
12.2 Introduction
So far in this book we have relied on our trusty turtle for any graphics we want to add to
our programs. However, most computer graphics programs do not use a turtle. Common
drawing programs that you may be familiar with, including Visio or OmniGraffle, allow
users to select the shapes they want to include in their drawing from a palette of available
shapes. For simple drawing

Get Python Programming in Context, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.