尚硅谷Java學(xué)科全套
class DiscountStrategy {
? ?public int discount(int price, User user) {
? ? ? ?return price;
? ?}}class NoDiscountStrategy extends DiscountStrategy {
? ?@Override
? ?public int discount(int price, User user) {
? ? ? ?return price;
? ?}}
標(biāo)簽: