package cn.edu.bjut.chapter4_1; public class Circle extends Shape { private double radius; public Circle(double radius) { this.radius = radius; } @Override public double area() { return (Math.PI * radius * radius); } @Override public double perimeter() { return (2 * Math.PI * radius); } }