Class, Objects, Arrays (Assignments Oct 23rd)

HW: 1.) Refactor a previous code project to include at least one function you define and is modularized using a class and object you define.

2.) Use an array to make more than one object appear and do something.

Comment each line to describe how the program works and what is different from the original code.

For all projects, detail your process on your blog and include comments in your code.
The code should include variables, operators and control structures in addition to items required for each assignment.


For this assignment, I picked one of the previous assignments to try applying the class and object concept to it. I was really glad that there was a way to compress the previous code to then having the code much neater thanks to understanding the class and object concepts. In comparison to the previous assignment, having the circles bundled into the class also helps reading the code easier without the redundancy.

The biggest difference from the previous code and now the new one is really the change from repeated ellipse in the void draw all condensed in the classes before the void setup.