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