Write a java program that presents the user with the followingmenu
Linear SearchBinary SearchThe user can choose any of these operations using numbers 1 or2. Once selected, the operation asks the user for an input file tobe searched (the file is provided to you and is namedinput.txt).
If option 1 or 2 is selected, it asks the user for the searchstring. This is the string that the user wants the program tosearch in the input file. Implement two methods stubs:
1) linearSearch – takes a file and a search string as inputs,and returns a boolean signifying found or not found.
2) binarySearch – takes a file and a search string as inputs,and returns a boolean signifying found or not found.
You will develop these stubs into actual functionality in thenext assignment.
Sample Output 1:
Please select from below:
1. Linear Search
2. Binary Search
Your selection: 1
Please enter the input file to searched: input.txt
Please enter the string to be searched in input.txt:RaDar
Search functionality is under maintenance. Thank you for usingmy search program.
—————————————————————————————
Sample output 2
Please select from below:
1. Linear Search
2. Binary Search
Your selection: 90
Please select between option 1 or 2
Your selection: 2
Please enter the input file to searched: words.txt
Please enter the string to be searched in words.txt:Recoil
Search functionality is under maintenance. Thank you for usingmy search program.
Expert Answer
Answer to Write a java program that presents the user with the following menuLinear SearchBinary SearchThe user can choose any of …