function setup() {
  createCanvas(1024, 600);
}

function draw() {
  background(255,0,0, 50);
  ellipse(mouseX, mouseY, 60, 60);
}

@@ -1,16 +1,27 @@
+var ball;%0A%0A
 function setup()
@@ -50,16 +50,39 @@
 , 600);%0A
+  ball = new Ball(60);%0A
 %7D%0A%0Afunct
@@ -127,38 +127,37 @@
 ;%0A  
-ellipse(mouseX, mouseY, 60, 60
+ball.update();%0A  ball.render(
 );%0A%7D

Add Ball object