Question: can you rewrite the code in order to pass the failing tests? for sorting you must implement a selection sort. 8.10 Project 4 - Help
can you rewrite the code in order to pass the failing tests? for sorting you must implement a selection sort.
8.10 Project 4 - Help me Sort My Roster About The class roster program is working really well. However, it would be nice to be able to sort students based on first name, last name, or their grade. I would like a program where I can choose how my roster is sorted and then print out the class summary Specification have provided a template main.cpp for you to edit e functions which have /*Provide Implementation are for you to edit Note: You are not allowed to change any of the function signature (be, add or edit parameter names and types, or change the function name or its return type) Note: For sorting you must implement a Selection Sort Note: If two elements are equal do not swap the elements SortByFirstName(vector students, vector grades) - option Sorts students and grades by the students first name SortByLostName(vector students vector grades) - option (lowercase Sorts students and grades by the students last name SortByGrade vector students, vector grades) option Sorts students and grades by the students grade You will nino need to add code which calls the functions if the user selecta to sort using that sort by function You can find it in the code by searching for provide toplementation for other menu options/ Unlike ont assignments which test matching output this antigament tests output along with testing your functions directly uning unit tests. The unit tests will use your functions with hardcoded vectors, if the testo file the unit tests will print out what it expected compared to what your function did when sorting. If you have any question please reach out via email, discussion board, or during office hours 1 #include 4 #include Igrades): 13 vold AddStudent vector 7/Print thank you message cout else if(selection - MENU PrintMeno: > else if(selection - SORT BY FIRST.NAME SortilyfirstName(students grades): 1 else if(selection - SORT BY LAST NAME Sortbylostone(students, grodes)! 1 else if(selection - SORT BY GRADE) SortilyGrode students grades) ) 1 else cout > numor Students; 96) 97 98 void PrintMenu 99 string menu "Please choose one of the following options: " 100 "ar add a student 10: "r: remove a student " 102 "p: print the class summary " I 103 "a print menu " 100 sort - First none 105 "L: sort - last namen 106 "G: sort - grade 107 *4 quit progra": 188 109 cout