// 抽象父类 Shape,定义所有图形的统一行为 public abstract class Shape { // 抽象方法:计算面积,由子类具体实现 public abstract double getArea(); }