Closed songyichao closed 5 years ago
不好意思,出现了笔误。
解决部分的代码应该如下:
double calculateTotal() {
if (basePrice() > 1000) {
return basePrice() * 0.95;
}
else {
return basePrice() * 0.98;
}
}
double basePrice() {
return quantity * itemPrice;
}