Question: Write a template Array class in C++ that can accept ANY type of numeric data, character data or string data. The array should be dynamically

Write a template Array class in C++ that can accept ANY type of numeric data, character data or string data. The array should be dynamically created based on size entered by the user. Then write the code for a quick sort algorithm as defined in the book. In your interactive main, ask the user for number of data items and type of data items to be entered. You can limit the types of data to 'int', 'double', 'char' and 'string'. Then get that many data items from the user - you can expect that the user will not make any error in entering the data items. Finally sort the data in ascending order and print the process of sorting to screen - remember to print out the pivot element at the start of every sort step and then how the array looks at the end of that sort step.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!