/** * Circle as a geometric Object */ public class Circle extends GeometricObject{ private int radius; public Circle(int radius) { this.name = "circle"; this.radius = radius; } /** * The perimiter of the circle * @return the perimiter */ public int getPerimiter() { return (int)(radius*2*Math.PI); } /** * The area of the circle * @return the area */ public int getArea() { return (int)(radius*radius*Math.PI); } public static void main(String[] args) { Circle c = new Circle(5); System.out.println(c); } }