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 I have provided a template main.cpp for you to edit You only have to add code to the areas that say /*Provide Implementation*/. You will find this in three functions, and in the selection handling portion of main Note: You are not allowed to change any of the function signature (ie. 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 Video Explanation Selection Sort Note: If two elements are equal do not swap the elements SortByFirstName(vector &students, vector &grades) - option f Sorts students and grades by the students first name SortByLastName(vector &students, vector &grades) - option l (lowercase L) Sorts students and grades by the students last name SortByGrade(vector &students, vector &grades) - option g Sorts students and grades by the students grade You will also need to add code which calls the functions if the user selects to sort using that sort by function You can find it in the code by searching for /*Provide Implementation for other menu options*/ Unlike past assignments which test matching output this assignment tests output along with testing your functions directly using unit tests. The unit tests will use your functions with hardcoded vectors, if the tests fails the unit tests will print out what it expected compared to what your function did when sorting. If you have any questions please reach out via email, discussion board, or during office hours. If you are having trouble passing the unit tests, try using the following as your input to see where it might be failing 5 Ricardo Romero 89.5 Gussie McFadden 98.7 Nala Mahon 100 Alyssa Massion 83.5 Stephanie McFadden 100 f p q This will print the result of sorting by first name. If youre failing a different unit test then change the option to the test you are failing while debugging ( replace f with l or g).

Public Answer

9IG54N The First Answerer