Assuming a student’s data record consists of the student’s name and the student’s GPA. Write a C++ program that first reads students’ data records from a user (of the program), and it continues to...

Assuming a student’s data record consists of the student’s name and the student’s GPA. Write a C++ program that first reads students’ data records from a user (of the program), and it continues to read students’ data records until the user decides to stop keying the data, and the program will then sort the keyed in data records into sorted order in terms of students’ GPAs, or in terms of the alphabetical order of the students’ last names, or doing both, depending on the user’s option. You may use the following framework to develop your program.

Use the following framework

#include


#include


#include


#include




using namespace std;




struct student


{


string name;


float gpa;


};




vector v;




void input_data();


void swap(student *std1, student *std2);


void sort_gpa_asc();


void sort_gpa_des();


void sort_name();


void show_data();




int main()


{


char option;


input_data();


cout




cin >> option;


if (option == 'g')


{



}


else if (option == 'a')


{



}


else if (option == 'B')


{



}


else


cout




return 0;


}




void input_data()


{


}


}




void swap(student *std1, student *std2)


{




}




void sort_gpa_asc()


{




}




void sort_gpa_des()


{




}




void sort_name()


{




}




void show_data()


{




}





Jun 24, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here