Question: (Processing Java Q) The following code is a very boring program it takes some kind of key number (in this case, 90210), and uses it

(Processing Java Q) The following code is a very boring program it takes some kind of key number (in this case, 90210), and uses it to generate a unique scene. All the quantities, the colors, and the size and location of the ellipse, are generated based on this number. First, type the program into processing and get it working (try your phone number!). Then, fix the program using comments, good variable names, and named constants, to be more readable.

size(500,500);

int a = 90210;

int b = a%256;

int c = (a*13)%256;

int d = a%(500/2);

int e = a%500;

int f = (a*13)%500;

d = max(10, d);

e = max(0, e);

f = max(0, f);

background(b);

stroke(c); fill(c);

ellipse(e, f, d, d);

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!