//Strategy->Interface , DiscountStrategy implements Strategy Strategy strategy = new DiscountStrategy(); Price price = new Price(strategy); double price = price.calculate(200); ->會使用DiscountStrategy的策略方法打折
沒有留言:
張貼留言