Question: Develop a program to read in the market basket data from a text file with the following format and identify the unique items printed on

Develop a program to read in the market basket data from a text file with the following format and identify the unique items printed on the screen.Continue your program to count the frequency each unique item. Please note that comments are part of the file but not the data. You are NOT allowed to modify the file format. You are free to chose the language. There will be more phases. So, make sure that you come up with a nice, well designed modular approach. You have to submit the code, the content of the data file, and the screen shot of the output as ONE file together.

-- market.data ---

6 //# of transactions

1, 3, gum, bread, napkin //transaction id, # of items purchased, item1, item3,...

2, 1, gum

3, 2, fruit, bread

4, 5, milk, bread, napkin, fork, juice

5, 3, juice, napkin, milk

6, 2, bread, spoon

Output for your program would look like this:

There are 8 unique items: gum, bread, napkin, fruit, milk, fork, juice, spoon.

Item Name Frequency

gum ............................... 3

bread ............................11

napkin ............................7

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!