Question 3 19 marks Some prices of electronics products of two electronics retailers are shown in the following tables:

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

Question 3 19 marks Some prices of electronics products of two electronics retailers are shown in the following tables:

Post by answerhappygod »

Question 3 19 Marks Some Prices Of Electronics Products Of Two Electronics Retailers Are Shown In The Following Tables 1
Question 3 19 Marks Some Prices Of Electronics Products Of Two Electronics Retailers Are Shown In The Following Tables 1 (40.05 KiB) Viewed 64 times
Question 3 19 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. (a) Write a program segment to store the above information of Company A in a map company. 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 clectronics 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

Question 3 19 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. (a) Write a program segment to store the above information of Company A in a map company. 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 clectronics 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
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply