[Edu-sig] Re: Best approach to teaching OOP and graphics

Arthur ajsiegel at optonline.net
Sat Mar 26 02:21:09 CET 2005

> -----Original Message-----
> From: edu-sig-bounces+ajsiegel=optonline.net at python.org [mailto:edu-sig-
> bounces+ajsiegel=optonline.net at python.org] On Behalf Of urnerk at qwest.net

> I'd have to see you proposal fleshed out in more detail.  What is the
> triangle a subclass or superclass of?  What are its methods and
> properties?

Its less of a proposal than an observation.  OOP is in fact often introduced
by way of classes of geometric objects, and subclasses thereof.

Java in a Nutshell Second Edition Chapter 3 
"Classes and Object in Java" walks the reader  through the creation of a
Circle class, explains that "Objects are Instances of Classes" and goes from
there in defining constructors, methods, etc. and then eventually
subclassing the Circle class with a DrawableCircle class.

The point is not that this particular book adopts this approach, but that in
so doing it is conforming to something of a convention - or so it seems to
me. Like the 3d teapot, or the "Hello World" program.

But there is no real point being made beyond that. If one chooses to follow
the convention - something like VPython provides a quite convenient way for
one to get one's DrawableCircle to actually draw, and without the need to
prepare anything in the way of a drawing context - which might otherwise
become the most complex, obscure and least relevant portion of the code.

> And what is the VPython framework you'd use to introduce OO?

Uhm... PyGeo ;)


More information about the Edu-sig mailing list