Write a program that does the following steps: . . ● ● Reads all the words in the "Smiley.txt" file and stores them in multimap Histogram(Wrd Longest, 0) that contains the total number of words of size 1,2,3,4,....Wrd Longest Print the Histogram vector Print all the words in Novel that are longer than 10 letters

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Smiley.txt:
The picket fence had stood for years without any issue. That's all it was. A simple, white, picket fence. Why it had all of a sudden become a lightning rod within the community was still unbelievable to most. Yet a community that had once lived in harmony was now divided in bitter hatred and it had everything to do with the white picket fence.

She had a terrible habit o comparing her life to others. She realized that their life experiences were completely different than her own and that she saw only what they wanted her to see, but that didn't matter. She still compared herself and yearned for what she thought they had and she didn't.
Write a program that does the following steps:
●
Reads all the words in the "Smiley.txt" file and stores them in multimap<string, int ) Novel where the string
refers to the Word and int refers to the Wordsize. The WordSize needs to be calculated as you fill the map.
You might want to use getline(myfile, myWord, '', where myfile is the handler to the file, myWord is
destination string where words are stored, ' ' is a delimiter.
Prints all the elements (string & size) of Novel
Finds the longest word in Novel and stores it in int WrdLongest
Creates a vector<int> Histogram(Wrd Longest, 0) that contains the total number of words of size
1,2,3,4,....Wrd Longest
Print the Histogram vector
Print all the words in Novel that are longer than 10 letters
Transcribed Image Text:Write a program that does the following steps: ● Reads all the words in the "Smiley.txt" file and stores them in multimap<string, int ) Novel where the string refers to the Word and int refers to the Wordsize. The WordSize needs to be calculated as you fill the map. You might want to use getline(myfile, myWord, '', where myfile is the handler to the file, myWord is destination string where words are stored, ' ' is a delimiter. Prints all the elements (string & size) of Novel Finds the longest word in Novel and stores it in int WrdLongest Creates a vector<int> Histogram(Wrd Longest, 0) that contains the total number of words of size 1,2,3,4,....Wrd Longest Print the Histogram vector Print all the words in Novel that are longer than 10 letters
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY