From 9fd467354b083e6b0595ea035555e35045c94531 Mon Sep 17 00:00:00 2001 From: Chengwuyi <3394813085@qq.com> Date: Mon, 30 Mar 2026 13:00:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=96=87=E4=BB=B6=E8=87=B3?= =?UTF-8?q?=20'w5'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- w5/Circle.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 w5/Circle.java diff --git a/w5/Circle.java b/w5/Circle.java new file mode 100644 index 0000000..b3a64bc --- /dev/null +++ b/w5/Circle.java @@ -0,0 +1,12 @@ +public class Circle extends Shape { + private double radius; + + public Circle(double radius) { + this.radius = radius; + } + + @Override + public double getArea() { + return Math.PI * radius * radius; + } +}