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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started