Question: In C# , Write a console app that initializes a List and assigns each line in horticulture _ terms.txt . Once the list is created

In C#, Write a console app that initializes a List and assigns each line in horticulture_terms.txt. Once the list is created prompt the user for input to search (You must use the binary search algorithm) for an item on the list. If the term is in the list, return the index at which it is.
For example:
User input : Urban Farming Innovations
Program output Urban Farming Innovations was in the list, and is saved at the element or Urban Farming Innovations not found in the list
Define Main Structure:
Use List
Use StreamReader to load the contents of the text file
Prompt user for input (search string)
Use binary search to find the string in the list. DO NOT USE List.IndexOf()
Display the appropriate output
Submit the following:
Source Code: Your zipped files and project & code
Evaluation Criteria
Functionality: The application runs without errors. Test your application thoroughly to catch and fix any bugs.
Code Quality: The code should be well-organized, properly formatted, and include comments where necessary for clarity.
If you want to go the extra mile:
Explore error handling, such as checking if the file exists before trying to read from it.
Ensure your application is user-friendly, with clear prompts and messages.
Display how many passes the binary search needed.

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 Programming Questions!