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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started