You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
/**
|
|
* 折扣策略接口,定义计算折扣的方法
|
|
*/
|
|
package com.orderprocessing;
|
|
|
|
public interface DiscountStrategy {
|
|
/**
|
|
* 计算订单折扣金额
|
|
* @param order 需要计算折扣的订单
|
|
* @return 折扣金额
|
|
*/
|
|
double calculateDiscount(Order order);
|
|
} |