Reference no: EM132121086
Recursive algorithms help C++ programming:
question: Create an ADT that contains a fixed-size array that holds 20 integers (i.e., int array[20]; ) and the following member functions:
A default constructor that initializes all the elements in this array to 20 random numbers (you can call the rand() function to generate a pseudo-random number).
A member function that recursively searches the largest number in the array. This function will return the value of the largest number.
A member function that recursively finds the value of the k-th smallest number in the array, where k is provided by the end-user. You are required to use the partition-based, recursive algorithm.
A member function that implements the recursive QuickSort algorithm to sort the array in increasing order.
You are required to use separate compilation. Specifically, your project will contain one header file, one .cpp file that implements all the member functions, and another .cpp file that contains the main() function. In the main() function, you will include test cases to call and test all your recursive functions.