Question: Selection Sort with data type Thanks Sample test code #include MySort.cpp #include using namespace std; Sample output int main(void){ Random Numbers -------------- 120, 60, 10,
Selection Sort with data type
Thanks
Sample test code #include "MySort.cpp" #include using namespace std; Sample output int main(void){ Random Numbers -------------- 120, 60, 10, 620, 650, 340, 930, 230, 700, 20, 620, 760, 230, 920, 910, 640, 470, 680, 48e, 840, 80, 770, 150, 380, 330, 250, 220, 178, 510, 768, 660, 978, 870, 930, 370, 930, 580, 748, 690, 330, 820, 930, 800, 280, 930, 878, 670, 678, 270, 720, 78, 900, 440, 390, 320, 358, 820, 30, 8see, 248, 410, 140, 920, 370, 898, 610, 930, 390, 720, 298, 620, 710, 70, 52 , 720, 620, 56, 460, 940, 48, , 140, 500, 67, , 680, 39, 570, 890, 650, 610, , 450, 770, 548, 190, 86, 710 , 170, 850, MySort sorter; int* sortedValues; cout "Random Numbers - sorter.assignRandom (); sorter.printData(); -- "; Ascending Numbers ---------------- 18, 20, 30, 6e, 60, 70, 70, 80, 120, 140, 140, 150, 178, 170, 198, 220, 230, 230, 240, 250, 270, 280, 290, 300, 320, 330 33, , 34, 350, 370, 370, 380, 39, 390, 39, 410, 440, 450, 460, 470, 488, 480, 500, 510, 520, 548, 56, 570, 580 610, 610, 620, 620, 620, 620, 640, 658e, 650, 660, 670, 670, 670, 680, 680, 698, 700, 710, 710, 720, 720, 720, 740, 760 760, 770, 77e, 800, 8e0, 820, 820, 84e, 850, 860, 870, 870, 890, 890, 900, 910, 920, 920, 930, 930, 930, 930, 930, 930 cout " Ascending Numbers -- "; , 940, 970, Descending Numbers ---- 970, 940, 930, 930, 930, 930, 930, 93e, 920, 920, 910, 900, 890, 898, 870, B70, 860, 850, 840, 820, B20, 800, see, 778, 770, 760, 760, 740, 720, 720, 720, 71e, 710, 700, 690, 680, 680, 670, 670, 670, 660, 650, 650, 640, 620, 620, 620, 620, 510, 610, 58e, 570, 560, 540, 520, 51e, 50e, 480, 480, 470, 460, 450, 440, 410, 390, 390, 390, 380, 37e, 370, 350, 340, , , 3, 320, 8, 290, 280, 27, 250, 248, 238, 230, 220, 190, 170, 170, 150, 140, 148, 120, 8, 70, 70, , , 3e, 20, 10, sortedvalues = sorter.sortAscending (); sorter.printArray(sortedValues); cout " Descending Numbers - - "; sortedvalues = sorter.sortDescending(); sorter.printArray(sortedValues); return e