Question: Write a C++ program that will sort a template array of data using the following guidelines Ask the user for the number of elements, not

Write a C++ program that will sort a template array of data using the following guidelines

Ask the user for the number of elements, not to exceed SORT_MAX_SIZE = 32

Ask the user for the type of data they want to sort - int, double, char, string.

Allow the user to enter data of their own choosing up to their chosen array size

Then sort the same array in the descending order using Insertion Sort, Quick Sort and Merge Sort, all recursive

Print out the array contents after the completion of every recursion step for each algorithm to visually demonstrate how the array is getting sorted by that algorithm. Take screenshots to be uploaded with the project.

Also, write out the screen output to an output file as well as your identifying information at the top.

Step by Step Solution

3.48 Rating (151 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

include using namespace std creating variable of template class template void ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!