package J20250724.demo01; /** * @author WanJl * @version 1.0 * @title Clothing * @description * @create 2025/7/24 */ public class Clothing extends Product{ private Integer size; public Integer getSize() { return size; } public void setSize(Integer size) { this.size = size; } @Override public double getDiscountPrice() throws InvalidPriceException{ Double price = this.getPrice(); if (price<=0){ throw new InvalidPriceException("价格异常"); } return 0; } }