public abstract class Figur implements Cloneable { int x; int y; public Figur(int x1, int y1) { x=x1; y=y1; } /** Tegner figuren på skærmen */ public abstract void tegn(java.awt.Graphics g); /** Giver en overfladisk kopi af dette objekt */ public Figur kopi() { try { Figur kopien = (Figur) this.clone(); return kopien; } catch (Exception e) { throw new InternalError("Kunne ikke klone"); } } }