Programming ProblemWrite a program to implement the sorting and searching algorithms discussed in the class. Theprogram should display the following menu repeatedly to allow user to read strings into thestring array, print the content of the array, sort the string array elements based on thealphabetic order of the initial letter of each string array element, search for a key letter(one single letter) in the array, or exit from the program.1. Read2. Print3. Sort4. Search0. QuitOption 3 should trigger the following submenu:1. Quick sort2. Merge sort0. QuitOption 4 should use the following submenu:1. Sequential search2. Binary search0. QuitNote• Assume all the input strings start with different letters.• The user is able to determine how many input strings are entered.• The key letter for searching is one single letter, the program should output the position ofthis key letter.Submission:Zip the Java source code folder and Submit it on Blackboard.Grading1. Demonstrate to Instructor (Bonus 5%)2. Include comments as specified in the course syllabus. (15%)3. Source code and results.• Correctness (70%)• Efficiency of the code (15%)
Write a program to implement the sorting and searching
program should display the following menu repeatedly to allow user to read strings into the
string array, print the content of the array, sort the string array elements based on the
alphabetic order of the initial letter of each string array element, search for a key letter
(one single letter) in the array, or exit from the program.
1. Read
2. Print
3. Sort
4. Search
0. Quit
Option 3 should trigger the following submenu:
1. Quick sort
2. Merge sort
0. Quit
Option 4 should use the following submenu:
1. Sequential search
2. Binary search
0. Quit
Note
• Assume all the input strings start with different letters.
• The user is able to determine how many input strings are entered.
• The key letter for searching is one single letter, the program should output the position of
this key letter.
Submission:
Zip the Java source code folder and Submit it on Blackboard.
Grading
1. Demonstrate to Instructor (Bonus 5%)
2. Include comments as specified in the course syllabus. (15%)
3. Source code and results.
• Correctness (70%)
• Efficiency of the code (15%)
Step by step
Solved in 2 steps