Menu

[solved] – Question 71515

Design, implement and test a C++ program which will process a list of names, sort them using selection sort, and save the output to a file.
Requirements
Process a data file of “student” names. See provided sample file
Include a function to sort the names in ascending or descending order using selection sort
Include another function to display the names BEFORE as well as AFTER it is sorted
Include yet another function to save the sorted names to a data file named Output_SortedNames.txt.”
Including main (), 4 or more functions must be implemented. Proper prototypes should be utilized and function bodies must be coded after the main function
Assume that the input data file will contain between 20 and 50 names where each name is written on a separate line and is constructed correctly

Input Validations –
“Reasonable” input and output validations are expected for this project
For example, if there is an error while attempting to open the input file, display an appropriate error message

Expert Answer


OR


Leave a Reply

Your email address will not be published. Required fields are marked *