Suppose that a file contains the numbers and prices of various products.
Each product number is given on a line by itself. The following line
contains the price of the product. Write code fragments that perform
each of the following:
a) Read the file and store all the prices of the products in a map
indexed by product number.
And I'm not really sure how to go about it. I can open a .txt file but have no idea how to store the file and it's contents into a map. Any help would greatly be appreciated!