public class Ring extends Kujund{ protected int r; public Ring(int x, int y, int r){ super(x, y); this.r=r; } public double pindala(){ return Math.PI*r*r; } public void joonista(java.awt.Graphics g){ g.drawOval(x-r, y-r, 2*r, 2*r); } }