Create a generic class for sorting data (numeric and non-numeric). Test data will include integer, float and
Question:
Create a generic class for sorting data (numeric and non-numeric). Test data will include integer, float and strings. Numeric data (integer and float) should be sorted in descending order. Strings should be sorted in lexicographic order (aka dictionary order).
The raw data should be stored in an array. For testing, prompt the user to enter 5 data items. You need to prompt the user to enter the type of data (0 – for integer, 1 – for float and 2- for string). After that prompt the user to enter 5 pieces of data.
You can use any sorting methods (bubble, selection, insertion or quicksort). However, if you use quicksort, you will earn 5 bonus points.
Sorting should be implemented as a method in the generic class. You should have a display method in the generic class to print the data after sorting.