PRO192_-_FA_2024_-_PE_2884.webp
T

PRO192_-_FA_2024_-_PE_2884.webp

Write a class MyFurniture, which implements the interface IFurniture. The class MyFurniture implements methods f1, f2 and f3 in IFurniture as below (you can add other functions in MyFurniture
class):
f1: Sum of price of furnitures that name does not end with 'n'.
f2: Sort the elements that the furniture name starts with a digit number in the list descendingly by price (other elements are unchanged).
f3: Remove all furnitures where the furniture name starts with a digit number and the furniture price is greater than the average price of all furnitures in the list. (if there is no element that satisfies the conditions then do nothing). (Must ensure that the list is updated in-place and maintain its original order for the remaining elements)
When running, the program will add some data to the list. Sample output might look something like:
4 of 4
Paper No: 1
+ 100%
Zoom
Close
Chưa có bình luận nào.

Thông tin

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

Image metadata

Filename
PRO192_-_FA_2024_-_PE_2884.webp
File size
169.8 KB
Dimensions
1920px x 803px

Share this media

Back
Bên trên Bottom