Write a C++ Program using classes, functions (recursive and otherwise), arrays and other C++ commands to sort a file using Selection Sort. The user will enter the filename. The file should be sorted by the following fields: first by Last Name, then by Mother’s Maiden Name, then by First Name and finally by Second Name (or Initial). The sorted file should be written to file and the first 10 results displayed on screen. Use the following format for both the screen output and the file created: ---------------------------------------------------------------- | Last Name | Mother’s Maiden Name | First Name | Second Name | ---------------------------------------------------------------- | Saotome | Tendo | Ranma | P | |--------------------------------------------------------------- | Son | Kakarot | Goku | A | ---------------------------------------------------------------- | Yeager | Kaiser | Eren | W | ----------------------------------------------------------------
Write a C++ Program using classes, functions (recursive and otherwise), arrays and other C++ commands to sort a file using Selection Sort. The user will enter the filename. The file should be sorted by the following fields: first by Last Name, then by Mother’s Maiden Name, then by First Name and finally by Second Name (or Initial). The sorted file should be written to file and the first 10 results displayed on screen.
Use the following format for both the screen output and the file created:
----------------------------------------------------------------
| Last Name | Mother’s Maiden Name | First Name | Second Name | ----------------------------------------------------------------
| Saotome | Tendo | Ranma | P | |---------------------------------------------------------------
| Son | Kakarot | Goku | A |
----------------------------------------------------------------
| Yeager | Kaiser | Eren | W |
----------------------------------------------------------------
Step by step
Solved in 4 steps with 8 images