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 8-8
#include <iostream>
#include <string>
using namespace std;
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” };
// Insert your code to complete this program
return 0;
}
Want to see the full answer?
Check out a sample textbook solutionChapter 8 Solutions
Starting Out with C++ from Control Structures to Objects (9th Edition)
Additional Engineering Textbook Solutions
Elementary Surveying: An Introduction To Geomatics (15th Edition)
Starting Out with Java: From Control Structures through Data Structures (4th Edition) (What's New in Computer Science)
Introduction To Programming Using Visual Basic (11th Edition)
Java How to Program, Early Objects (11th Edition) (Deitel: How to Program)
Java: An Introduction to Problem Solving and Programming (8th Edition)
Database Concepts (8th Edition)
- (Using R language)arrow_forwardAfter our initial deployment for our ML home based security system, the first steps we took to contribute further to the project, we conducted load testing, tested and optimize for low latency, and automated user onboarding. What should be next?arrow_forwardWhy investing in skills and technology is a critical factor in the financial management aspect of system projects.arrow_forward
- C++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage LearningProgramming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:CengageEBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrSystems ArchitectureComputer ScienceISBN:9781305080195Author:Stephen D. BurdPublisher:Cengage LearningMicrosoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,