Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Management An Organizational Perspective

Authors: Richard T. Watson

1st Edition

0471305340, 978-0471305347

More Books

Students also viewed these Databases questions