sorting algorithm
I am working on a sorting program that sorts batting averages and names, and prints them to the screen. I am trying to get the sortData function to work in the main function#include <iostream>#include <string>using namespace std;class Average{private:string name[12];double avg[12];public:void getData();void sortData(string[], double[], int);void displayData();};void Average::getData(){string play_name;double average;for (int i