PRO192_-_PE02_-_SU_2024_2181.webp
G

PRO192_-_PE02_-_SU_2024_2181.webp

id, name, and discount percentage. The discount percentage is formatted to two decimal places
Write a class Promotion Manager which extends from ArrayList (ArrayList is a collection) with the following information:
Promotion Manager
+addPromotion(promotion: Promotion):void +getMinDiscountPercentage(): double
Where:
addPromotion(promotion: Promotion): void-add a new promotion to the collection
5 of 6 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> {

+ 93%
Close
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,096
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
155.9 KB
Dimensions
1920px x 859px

Share this media

Back
Bên trên Bottom