Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

Generic Data Sorter with Quicksort Bonus points Her... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Using Excel & Access for Accounting 2010

Authors: Glenn Owen

3rd edition

1111532672, 978-1111532673

More Books

Students also viewed these Programming questions