Question: The user will enter exactly 20 names. Use a bubble sort to complete the sort in this exercise. Use a binary search to complete the

The user will enter exactly 20 names.

Use a bubble sort to complete the sort in this exercise.

Use a binary search to complete the search in this exercise. Display the position number of the name (zero-indexed) and the number of array lookups required for each search. Allow the user to do as many searches as they'd like. If the user enters a name that is not on the list you can either display nothing or you may print out an appropriate message to the user. The user will indicate they are done searching by pressing enter (and then the program will end).

sorted names

Design a program that allows the user to enter 20 names into a string array. sort the array in ascending order and display its contents.

name search

Modify the sorted names program so it allows you to search the array for a specific name.

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!