Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Selection Sort with data type Thanks In this project you are going to implement one of the sorting algorithms below which your student group is
Selection Sort with
Thanks
In this project you are going to implement one of the sorting algorithms below which your student group is responsible for. MySort.h class MySort { private: int* data; /* you need to change the data type (double or char instead of int) T L depending on the sorting algorithm you are responsible/ L const int N = 100; /* N should be adjustable (when we change N to i.e: 10000 L than your algorithm can sort 10000 values) */ You need to implement a full sorting class (depending on the algorithm your group is responsible assigned in the page below) with both ascending and descending sorting operations along with random assignment functions. You need to use the following header file named as "Mysort.h". Include it in your project and design your data types depending on the requirements of your own sorting algorithm. You need to create a cpp file named as "Mysort.cpp" and define the functions whose declarations are already given in the "Mysort.h" header file. You need to design sortAscending and sortDescending functions with the specific sorting algorithm that your student group is responsible. You need to submit all 3 files "SortTest.cpp" (sample test file including main), "Mysort.h", "MySort.cpp", in a zip file by the deadline of the homework. public: MySort(); void assignRandom(); /* assigns random values into the data' array void printData(); /* prints out the data' array void printArray(int*); /* prints out the array passed as parameter i int* sortAscending(); /* sorts out the data' array in ascending order and outputs sorted array */ int* sortDescending(); /* sorts out the data' array in descending order I L and outputs sorted array */ T Sample test code #include "MySort.cpp" #includeStep 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