1  import java.awt.*;
 2  public class circle extends primitive
 3  {
 4
 5      point Center;
 6      float R;
 7
 8      public circle( float x,float y,float r)
 9      {
10          Center=new point(x,y);
11          R=r;
12      }
13
14      public void receive(visitor v)
15      {
16          v.visitCIRCLE(this);
17      }
18
19      public void zeichne(Graphics g)
20      {
21          int x,y,width,height;
22
23          x=(int) (Center.X-R);
24          y=(int) (Center.Y-R);
25          width=(int) (2*R);
26          height=(int)(2*R);
27
28          g.drawOval(x,y,width,height);
29      }
30  }