Question: COMPLETE THE FOLLOWING PROGRAM AS IT SAYS. DO NOT INCLUDE OTHER LIBRARIES APART FROM IOSTREAM!!! ONLY FILL IN WHERE NEED TO. I'LL REPORT THE ANSWER

COMPLETE THE FOLLOWING PROGRAM AS IT SAYS. DO NOT INCLUDE OTHER LIBRARIES APART FROM IOSTREAM!!! ONLY FILL IN WHERE NEED TO. I'LL REPORT THE ANSWER IF WRONG. // Topic: Sorting arrays // File name: sort.cpp #include  using namespace std; // Declare a method named bubbleSort which recieves // an integer array and its length as parameters and // has no return value. // Declare a method named selectionSort which recieves // an integer array and its length as parameters and // has no return value. // Declare a method named printArray which recieves // an integer array and its length as parameters and // has no return value. // Declare a method named random which recieves // an integer array and its length as parameters and // has no return value. int main(){ // declare an integer constant named SIZE and initialize to 5 // declare an integer array named numbers using the constant // declared earlier as its length, and initialize all values // to 0. // call the print array method with the numbers array and its length as arguments // declare an integer array named digits using the constant // declared earlier as its length, and initialize all values // to 0. // call the print array method with the digits array and its length as arguments // call the random method with the numbers array and its length as arguments // call the print array method with the numbers array and its length as arguments // call the random method with the digits array and its length as arguments // call the print array method with the digits array and its length as arguments // call the bubbleSort method with the numbers array and its length as arguments // call the print array method with the numbers array and its length as arguments // call the selectionSort method with the digits array and its length as arguments // call the print array method with the digits array and its length as arguments system("pause"); // Visual Studio only! return 0; // MUST be included ALWAYS! } // Define a method named bubbleSort which recieves // an integer array and its length as parameters and // has no return value. The method orders the values in the // array from smallest to largest implementing the bubble // sort algorithm. // Define a method named selectionSort which recieves // an integer array and its length as parameters and // has no return value. The method orders the values in the // array from smallest to largest implementing the selection // sort algorithm. // Declare a method named printArray which recieves // an integer array and its length as parameters and // has no return value. The methods prints the values in the // array separated by a tab space. It first prints the phrase // "The values stored in the array are: ", and then print the // values IN THE SAME LINE. Add two new lines after the last // value is printed. // Declare a method named random which recieves // an integer array and its length as parameters and // has no return value. The method assigns a random value to // each element of the array using the rand function. It // also uses srand to seed to pseudo-random number generator // by passing the result of the time function as argument.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!