Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please use C++ code applicable to an introductory class Assume you have a set of parallel arrays in main0 as follows const int NUMBER 12

Please use C++ code applicable to an introductory class

image text in transcribed

Assume you have a set of parallel arrays in main0 as follows const int NUMBER 12 const int BUFFER SIZE 16, int id NUMBER (8236, 4578, 358, 7092, 0475, 8478, 4587, 709, 7528, 7541, 6457, 3) char name[NUMBERIBUFFER_SIZEI Wendy". "Bob, "Jane", Fred, Tony", "Art" Becky", "Cathy" "Joan", "Tom", "Aaron", "John"T STEP 1: Write a program that will first sort the arrays based on id. STEP 2: Perform a binary search as follows: . Search for 7092 and output "id name. For example, 7092 Fred . Search for 3 and output "id name. For example, 3:John . Search for 9455 and output "not found. STEP 3: perform a linear search as follows Search for "Wendy and output id name. For example, 8236.Wendy . Search for Tom and output id name. For example, 7541 Tom Search for "Anthony and output not found

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_2

Step: 3

blur-text-image_3

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

Data Management Databases And Organizations

Authors: Richard T. Watson

3rd Edition

0471418455, 978-0471418450

More Books

Students also viewed these Databases questions

Question

1. Specify (the values for H).

Answered: 1 week ago

Question

Q: Do you carry out PAs?

Answered: 1 week ago