Clarification of methods being called using a stoplight example
<p>The code below appears in my book in the chapter about Methods. I'm a little confused about a couple of things.</p>

<ol>
<li>Is my understanding correct when I believe that the <code>run()</code> method is calling the <code>createFilledCircle</code> method?</li>
<li>Is the <code>run()</code> method the receiver and the <code>createFilledCircle</code> the sender?</li>
<li>for the three <code>add(createFilledCircles...red,yellow and green);</code> how does the programmer know what information is permitted in the argument? Is the format of <code>(x location, y location, width of figure, height of figure)</code> being used in the <code>add(createFilledCircle)</code>?  </li>
</ol>

<p><br/></p>

<pre><code>import acm.program.*;
import acm.graphics.*;
import java.awt.*;

public class StopLight extends ConsoleProgram {
  public void run() {
    double cy = getWidth() / 2 ;
    double cx=  getHeight() / 2; 

    double fx = cx - (FRAME_WIDTH / 2);
    double fy = cy - (FRAME_HEIGHT /2 );

    double dy = (FRAME_HEIGHT / 4 ) + (LAMP_RADIUS / 2);

    GRect frame = new GRect (fx, fy, FRAME_WIDTH, FRAME_HEIGHT);
    frame.setFilled(trye);
    frame.setColor(Color.GRAY);
    add(frame);

    add(createFilledCircle(cx, cy-dy, LAMP_RADIUS, Color.RED));
    add(createFilledCircle(cx, cy, LAMP_RADIUS, Color.YELLOW));
    add(createFilledCircle(cx, cy + dy, LAMP_RADIUS, Color.GREEN));
  }

  private GOval createFilledCircle (double x, double y, double r, Color color) {
    GOval circle = new GOval (x -r, y -r, 2 * r, 2 * y );
    circle.setFilled(true);
    circle.setColor(color);
    return circle; 
  }

  private static final double FRAME_WIDTH = 50; 
  private static final double FRAME_HEIGHT = 100;
  private static final LAMP_RADIUS = 10; 
}
</code></pre>
