SWD392_SU25_PE_2_4138.webp
H

SWD392_SU25_PE_2_4138.webp

Bài viết gốc: Chủ đề 'SWD392_SU25_PE_2'
☑Kizspy.me
public double calculate Price (double basePrice, int quantity, String customerType)
double vipDiscount = 0.20; // 20% VIP discount
return basePrice quantity (1 vipDiscount);
}
public class FlowerOrder (
private Pricing pricing;
public void setPricing (Pricing p) {
this.pricingStrategy = p;
}
public double calculateOrderTotal (double basePrice, int quantity, String
customerType) {
return pricing.calculatePrice (basePrice, quantity, customerType);
Zoom
1. WHAT DESIGN PATTERN is used in the code above? Identify its name and pattern family
(creational, structural, or behavioral.) (0.5 points)
+ 100%
Close
Chưa có bình luận nào.

Thông tin

Category
SWD392
Thêm bởi
hoangha295
Ngày thêm
Lượt xem
2,791
Lượt bình luận
0
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom