“91974˙CH10˙final” 2012/12/14 14:32 page 329 #1
CHAPTER
10
Astronomy
10.1 Objectives
To explore classes and objects further
To understand how to construct a class
To write constructors, accessor methods, and mutator methods
To understand the concept of self
To explore instance data
To implement a graphical simulation using objects
10.2 Introduction
Have you ever witnessed a lunar eclipse? The resulting images of a shadowed moon with
changes in color and brightness cause us to ask questions as to the details of this uncommon
occurrence. We learned in science class that this fascinating celestial event is caused by
the relative motion of the

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.