Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You need to calculate how many times each word appears in thelist of words. Create a Dictionary to store those counts. The keyof the dictionary

You need to calculate how many times each word appears in thelist of words. Create a Dictionary to store those counts. The keyof the dictionary will be the words and the value will be thecounts. Loop over the list of words and put or update the word inthe dictionary. • Make it case-insensitive meaning that if theword is upper-case and lower-case in the data, only 1will appear in the dictionary. For example, ‘The’ and ‘the’are the same word so only one should be in the dictionary. •You need to check if the word is in the dictionary to decide if itshould be added or if it should be updated. Use ContainsKey orTryGetValue.

Add logic to the menu for the "Show Histogram" option. For eachword in the dictionary, print the dictionary, print the word, thecount, and a bar representing the count as a horizontal bar chart(see screenshot). Format your chart to make it look nice! UseConsole.CursorLeft to align the bars.

Ex output

I =====8

today ===================19

Now you have the information you need to add logic to the menufor the “Search for Word” option. Ask the user for a word to searchfor (“What word do you want to find? “). Use ReadString to get theword from the user! If the word is in the Dictionary, print theword, bar, and count. Show the sentences that the word appears in.HINT: you can split the original speech text on differentdelimiters to get the sentences. If the word is NOT in thedictionary, print “ is not found.”. (replace with what the userentered). Using C#

Ex. 1. Show Histogram

2. Search for Word

3. Exit

Choice?

Step by Step Solution

3.32 Rating (161 Votes )

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing Fundamentals, Design, and Implementation

Authors: David M. Kroenke, David J. Auer

14th edition

133876705, 9781292107639, 1292107634, 978-0133876703

More Books

Students also viewed these Electrical Engineering questions

Question

What is an ADO DataSet?

Answered: 1 week ago