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