12345678910111213141516171819202122232425262728293031323334353637383940 |
- package J20250724.demo01;
- /**
- * @author WanJl
- * @version 1.0
- * @title Product
- * @description
- * @create 2025/7/24
- */
- public abstract class Product {
- private Integer id;
- private String name;
- private Double price;
- public Integer getId() {
- return id;
- }
- public void setId(Integer id) {
- this.id = id;
- }
- public String getName() {
- return name;
- }
- public void setName(String name) {
- this.name = name;
- }
- public Double getPrice() {
- return price;
- }
- public void setPrice(Double price) {
- this.price = price;
- }
- public abstract double getDiscountPrice() throws InvalidPriceException;
- }
|