Learning Processing, Chapter 8 (Objects).
This one is very straightforward. Modify the following files from our Example Code page, so that the primary graphic elements (balls) are implemented as class definitions, and so that the drawing and setup in the programs works with these objects, rather than a collection of independent attributes:
In both cases, you'll to think about which values belong as attributes of the "ball" object. In both cases, you must define an appropriate constructor for the object, as well as a suitable update() method. The program's setup and draw procedures should make use of these methods appropriately.
Your code must be syntactically correct. Any solution that contains a syntax or type error anywhere (and hence crashes when you hit the "play" button") will receive no credit.
If you run into any trouble here, please ask me or one of the TAs for help.
Naturally, your code must be behaviorally correct, though partial credit is always given for partial solutions.
As with all assignments for this course, submit the folder containing your Processing sketches. This should be a single folder named "hw5", which will contain your two sketches. You do not need to submit a paper printout of anything. Again, the turnin directory is
You may re-submit this work as many times as you like, up to the due date/time. Anything submitted after 2:59 pm on Wednesday 11/20 will be considered late (and every file contains a time stamp).John H. E. Lasseter