class DataCircle{ // creates a class named DataCircle int circleSize; // creates a property (aka instance variable) called circleSize of type int color circleColor; // creates a property called colorColor 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 int z; // creates a property called z that will store an int DataCircle(int cSize, color cColor, int cx, int cy, int cz) { // defines the method used to create a DataCircle 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 circleSize = cSize; // sets the property circleSize to equal whatever was received in rSize circleColor = cColor; // sets the property circleColor to equal whatever was received in rColor x = cx; // sets the property x to equal whatever was received in cx y = cy; // sets the proeprty y to equal whatever was received in cy z = cz; // sets the proeprty z to equal whatever was received in cy } DataCircle(DataNode n){ String type = n.carName; int date = n.date; float miles = n.mileage; float price = n.gasPrice; circleSize = 50; if (type.equals("Taurus")) { int rand = (int) random(50); circleColor = color(50 + rand, 10 + random(10), 50 + rand); } else if (type.equals("Matrix")) circleColor = color(10 + random(50), 20 + random(50), 90 + random(150)); else if (type.equals("Civic")) circleColor = color(90 + random(150), 20 + random(50), 10 + random(50)); else circleColor = color(0,255,0); x = date*3; y = (int) (miles * -100); z = (int) (price * 1000); } void changeSize(int num) { circleSize += num; } void display() { fill(circleColor); // set the fill color to be whatever is store in this object's circleColor property pushMatrix(); translate(x,y,z); sphere(circleSize); // draw the sphere of size circleSize popMatrix(); } }