Write a program that inputs a file of text and counts the


Write a program that inputs a file of text and counts the occurrence of words in the text (for example, "write" appears 1 time in this sentence; "a" appears 2 times). After counting the number of occurrences of each word, the program should output the list of the words along with the count for each.

The program should ignore punctuation, digits, and anything else but units made up of alphabetic characters. It should also ignore case. For example, consider this sentence: "The 3-time winner of the Nobel Peace Prize, Dr. Suess, last won it in 2009." The "3-time" would count for the word "time" because the "3-" would be ignored. "Dr." would count as "dr" because the period would be not considered. "2009" would not count at all.

The output can be in any order but should be formatted to look pleasing.

The program should only use facilities in C# we learned last semester. Either parallel arrays, and array of structs, or an array of objects should be used to keep the counts. It is acceptable to assume that there is an upper bound on the total number of words in the file, such as 2000.

Solution Preview :

Prepared by a verified Expert
DOT NET Programming: Write a program that inputs a file of text and counts the
Reference No:- TGS01269598

Now Priced at $40 (50% Discount)

Recommended (96%)

Rated (4.8/5)