class Cube { float xpos; float ypos; float xspeed; Cube(color c_, float xpos_, float ypos_, float xspeed_) {; xpos = random(width); ypos = random(height); xspeed = random (1,3); } void display() { stroke(25,250,10); fill (35,67,175); rectMode(CENTER); rect (xpos,ypos,40,40); } void move(){ xpos = xpos +xspeed; if (xpos > width) { xpos = 0; } } }