class Pulse { /* attributes */ int SCALE = 10; int x; // x-coordinate of the pulse int y; // y-coordinate of the pulse float s; // size of the pulse color c; // color of the pulse /* methods */ // constructor public Pulse(int pulseX, int pulseY, color pulseColor) { x = pulseX; y = pulseY; s = 0; c = pulseColor; } // moves the pulse to the given position void move(int newX, int newY) { x = newX; y = newY; } // draws the pulse and updates its size void draw() { fill(c); ellipse(x, y, sin(s)*SCALE, sin(s)*SCALE); s += 0.1; } }