PRO192_-_PE02_-_SU_2024_2181.webp
G

PRO192_-_PE02_-_SU_2024_2181.webp

Paper No: 1
+sumDiscountPercentageByValue(value:double): double
getMinDiscount Percentage(): double - return the smallest discount percentage among all
promotions.
sumDiscountPercentageByValue(value:double ): double - return the sum of discount percentage of promotions that have discount percentage greater or equal to value. If no matching data is found, return 0
Hints: to declare the PromotionManager class, you can use the following statement:
public class Promotion Manager extends ArrayList<Promotion> {
}
The program output might look something like this (using the PromotionManager class):
The promotions have been added:
The promotions have been added:
100, Big sale, 10.00
100, Big sale, 10.00
101, Sampling, 15.00
101, Sampling, 15.00
102, Flash Sale, 20.00
102, Flash Sale, 20.00
103, Refund, 25.00
103, Refund, 25.00
104, Loyal, 30.50
104, Loyal, 30.50
Add a new promotion:
Add a new promotion:
Enter id:106
Enter id:106
Enter name:Opening
Enter name:Opening
Enter discount percentage:9.9
Enter discount percentage:40
1.Test getMinDiscountPercentage
1.Test getMinDiscountPercentage
Close

+ 93%
Chưa có bình luận nào.

Thông tin

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

Image metadata

Filename
PRO192_-_PE02_-_SU_2024_2181.webp
File size
182.1 KB
Dimensions
1920px x 859px

Share this media

Back
Bên trên Bottom