Question: 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++
![Beginning Programming C++ #include #include using namespace std; void selectionSort(string[], int); void](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f4fc24b59db_36466f4fc24344ba.jpg)
#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
Get step-by-step solutions from verified subject matter experts
