CS 2, Winter 2009
Programming for Interactive Digital Arts

SA 9, due Fri, Feb 6

To try your hand at arrays, create a little solar system. Define a Planet class to store information about each planet — its current angle, the radius of its orbit, etc. (packaging up what you did for the orbiting part of SA 6). Then in the main part of the sketch, create an array and fill it with Planet instances. In the draw() body, draw a sun and then ask each Plant to draw itself and update itself. Details of the planets (sizes, orbits, speeds, etc., and even how many) are up to you; the example creates them all randomly.

screenshot[applet]

As always, turn in the zipfile on Blackboard, as SA 9 in the Assignments section. In the field where you can type in some information, please tell me roughly how long this assignment took, and if there were any particular difficulties.