Box b1, b2; // Two boxes with balls in them
void setup() { size(500, 500); b1 = new Box(50, 50, 150, 150, 30); // 30 balls b2 = new Box(250, 50, 150, 150, 50); // 50 balls } // setup()
void draw() { background(255); b1.display(); b1.update(); b2.display(); b2.update(); } // draw()