Question: (40+%) Using file Class and the read method of File class and String classs many methods, write a C# program that reads a user input

(40+%) Using file Class and the read method of File class and String classs many methods, write a C# program that reads a user input file and a user input string to search in that file (such as searching for the word the in the input file Gettysburg.txt).

(12%) Display the number of times this word appears in the input text (your output can be like: the word you searched for the appears 15 times in the input file)

(18%) Display how each occurrence of the searched word looks in the input text. For clarity you may put double quotes before and after the word you are searching (for example: the the, then the The them lathe wither the THE mathematics etc.).

If there are too many occurrence such as > 100 times, select a partial list of outputs the you find in the input.

(10%) Display for the occurrence of the, the whole sentence containing that word. For example , for the sentence The drought withered the buds, youll display like this:

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!