Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Beginning Programming C++ #include #include using namespace std; void selectionSort(string[], int ); void dispArray(string[], int ); int main() { const int NUM_NAMES = 20; string

Beginning Programming C++

image text in transcribed

#include  #include  using namespace std; void selectionSort(string[], int); void dispArray(string[], int); int main() { const int NUM_NAMES = 20; string names[NUM_NAMES] = {"Collins, Bill", "Smith, Bart", "Allen, Jim", "Griffin, Jim", "Stamey, Marty", "Rose, Geri", "Taylor, Terri", "Johnson, Jill", "Allison, Jeff", "Looney, Joe", "Wolfe, Bill", "James, Jean", "Weaver, Jim", "Pore, Bob", "Rutherford, Greg", "Javens, Renee", "Harrison, Rose", "Setzer, Cathy", "Pike, Gordon", "Holland, Beth"}; cout void selectionSort(string names[], int size) { int mindInd; string temp; for(int i = 0; i for(int j = i+1; j if(names[j] void dispArray(string names[], int size) { for(int i = 0; i  

The above program is for question 6. Can you please help me with question 11.

6. String Selection Sort Modify the selectionSort function presented in this chapter so it sorts an array of strings instead of an array of ints. Test the function with a driver program. Use Program 8-8 as a skeleton to complete. Program 8-8 #include #include using namespace std; int main) const int NUM_NAMES 20; string names [NUM_NAMES]("Collins, Bill", "Smith, Bart, "A11en, Jim", Griffin, Jim", "Stamey, Marty" "Rose, Geri", Taylor, Terri", "Johnson, Jill", "Allison, Jeff", "Looney,Joe", "Wolfe, Bil1", James, Jean", "Weaver, Jim"Pore, Bob" Rutherford, Greg" "Javens, Renee" "Harrison, Rose*, "Setzer, Cathy" "Pike , Gordon", "Holland , Beth" }; II Insert your code to complete this program return 0; 11. Using Files-String Selection Sort Modification Modify the program you wrote for Programming Challenge 6 (String Selection Sort) so it reads in 20 strings from a file. The data can be found in the names.txt file

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

Data Management Databases And Organizations

Authors: Watson Watson

5th Edition

0471715360, 978-0471715368

More Books

Students also viewed these Databases questions

Question

Evaluate 3x - x for x = -2 Answer:

Answered: 1 week ago

Question

What is group replacement? Explain with an example. (2-3 lines)

Answered: 1 week ago

Question

Provide examples of KPIs in Human Capital Management.

Answered: 1 week ago

Question

What are OLAP Cubes?

Answered: 1 week ago