package com.rental.shape; public class ShapeUtil { public static void printArea(Shape shape) { System.out.println("图形名称: " + shape.getName()); System.out.println("面积: " + shape.getArea()); System.out.println("----------------------"); } }