/* * Definition of class circle */ class Circle extends Shape { private int rad; // N.B. This shows how you can use same var name in ivar and arg public Circle (int x, int y, int rad) { this.x = x; this.y = y; this.rad = rad; } public void setSize (int rad) { this.rad = rad; } public void draw() { System.out.println ("Drawing circle at " + x + ", " + y + ", radius = " + rad); } public float area() { return (float) (rad * rad * 3.14159); } }