Perdes

Sorting.cpp

Feb 6th, 2019
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. #include <iostream>
  2. #include <stdlib.h>
  3. #include <vector>
  4. #include "Tests.h"
  5.  
  6. using namespace std;
  7.  
  8.  
  9. int main()
  10. {
  11. Tests to;
  12. int a[4]= {4, 5, 6 , 9};
  13. to.IntegerSorter(a);// test object
  14. /*system("clear");
  15. cout << "\tSorting Program\n" << endl;
  16. int a[] = { 5, 2, 2, 3 , 67, 99 };
  17. //float b[] = { 5.9f, 2.5f, 2.3f, 3.5f , 67.0f, 99.8f };
  18.  
  19. cout << "Test 1: Sorting Integers" << endl;
  20. cout << sizeof(a)/sizeof(a[0]) << endl;
  21. Tests:IntegerSorter(a);
  22. cout << "\nTest 2: Sorting Float Numbers" << endl;
  23.  
  24. cout << "Test 3: Sorting Integers and Floating Point numbers" << endl;*/
  25. cin.get();
  26. }
  27.  
  28. //REQUIREMENTS //
  29. //1. Sort a finite amount of real numbers. (Create an algorithm)
  30. //1a. Can sort integers and floating point numbers
  31. //2. Sort just floating point objects
  32. //a. real numbers
  33. //b. negative zero
  34. //c. negative infinity
  35. //d. posiive infinity
  36. //e. NaN objects
  37. //3. Can sort a list of length 0 - Return error
  38. //4. Can sort a list of length 1
  39. //5. Can sort a list of length 2
  40. //6. Can sort a list of variable length
  41. //7. Can sort a list with at least two equal elements
  42. //8. Times the sorting algorithm by any machine implemented method
  43. //9. Gives a table of time versus number of elements sorted
  44. //10. Gives a graph of time versus number of elements sorted
  45. //11. Bonus for original work or conventional work done exceptionally well
  46. //12. Report in PDF file
Advertisement
Add Comment
Please, Sign In to add comment