Question 3 [9 marks) Some prices of electronics products of two electronics retailers are shown in the following tables:
Posted: Sun May 15, 2022 11:51 am
Question 3 [9 marks) Some prices of electronics products of two electronics retailers are shown in the following tables: Price Company A: Electronics Products Television Iron Washing machine 5000 800 2500 Price Company B: Electronics Products Refrigerator Iron Washing machine 1600 750 2650 The above information is to be stored in two maps (Map<String, Double>) referenced by companyA and company for Company A and Company B respectively. Every product is assumed to be unique in each map and it is the key of it. Write a program segment to store the above information of Company A in a map companyA. Remember to create it first. (b) Assume there are many entries in the maps and one company can have some electronics products not available in the other company. Write a program segment with an enhanced for loop to print out the name of each electronics product available in both of the companies and its lowest price. For example, the string "IRON, 750.0" is printed when we are considering "IRON". 191