Reference no: EM13161569
Student.txt in the attachment contains the roster of a class. Each student object has the following fields:
student id, last name, first name, academic level.
Create a RosterClass to store the student database in vector.
RosterClass has "quickSort1" function that sorts students by id with the FIRST element as pivot. The function output each pivot and size of the list like this:
pivot=3 list=3,2,1,17,.....
RosterClass has "quickSortM" function that sorts students by id with the MIDDLE element (size/2) as pivot. The function does the same output as above.
Write the output to PE4_xxxx.txt where xxxx is last 4 digit of your id. Submit output file and source codes through canvas.
Your main program shall include the following statements:
cout << "My name is (your name here), last 4 digits of id is (xxxx)\n";
...
RosterClass.quickSort1();
// printout the sorted list
...
RosterClass.quickSortM();
// printout the sorted list
****Student.txt File******
3, lin, frank, freshman
50, bush, george sr., junior
1, obama, michelle, freshman
17, boeing, dream, junior
4, linear, francisco, senior
5, obama, barack, senior
22, bush, george, junior
7, linux, fran, freshman
16, apple, steve, senior
15, broadcom, andre, senior
14, cisco, chris, junior
32, google, dino, senior
11, yahoo, tim, junior
20, motorola, kim, senior
13, amazon, bezos, senior
40, lockeed, cindy, junior
8, oracle, michelle, senior
19, facebook, mark, senior
18, oracle, larry, senior