class MyRect{ // creates a class named MyRect int rectSize; // creates a property (aka instance variable) called rectSize of type int color rectColor; // creates a property called rectColor that will store a color object int x; // creates a property called x that will store an int int y; // creates a property called y that will store an int MyRect(int rSize, color rColor, int rx, int ry) { // defines the method used to create a MyRect object... // ... this method accepts four parameters.... // ... the first is an int for the size, the second is... // ... a color object, and the last two are ints rectSize = rSize; // sets the property rectSize to equal whatever was received in rSize rectColor = rColor; // sets the property rectColor to equal whatever was received in rColor x = rx; // sets the property x to equal whatever was received in rx y = ry; // sets the proeprty y to equal whatever was received in ry } void display() { fill(rectColor); // set the fill color to be whatever is store in this object's rectColor property rect(x,y, rectSize, rectSize); // draw the rectangle using the x,y and rectSize properties of this object } } MyRect[] rects; // create an variable named 'rects' that will store an array MyRect objects void setup() { size(500,500); rects = new MyRect[50]; // create the array of MyRect objects and store it in the variable we created earlier for(int i=0;i<50;i++) { // loop from 0 to 49 color c = color(random(255), random(255), random(255), random(255)); // create a color object with random values (the 4th value is transparency) rects[i] = new MyRect(int(random(200)), c, int(random(width)), int(random(height))); // create a new MyRect object and store it in our array } noStroke(); // draw all shapes without a border } void draw() { background(0); // set the background to black for(int i=0; i