Question: Please write the code in C++ and explain clearly. Write a program and utilize a class to randomly generate 1000 numbers from 0-1000. Than push

Please write the code in C++ and explain clearly.

Write a program and utilize a class to randomly generate 1000 numbers from 0-1000. Than push random numbers into an array. Once data is in the array create a menu of 11 methods that will output values.

Method 1: To output all values

Method 2: To output the sum of all values

Method 3: To output all odd numbers

Method 4: To output all even numbers

Method 5: To output Middle value

Method 6: To output the first value in the array

Method 7: To output the last value in the array

Method 8: To output the highest value and its location in the array

Method 9: Output the lowest value and its location in the array

Method 10: Sort and then output values. Hardcode the bubble sort algorithm you will implement

Method 11: Create a linear search method that will allow the user to input an integer value and the method will output the location of the value in the array. The value could exist in multiple locations. And the method should output value does not exist if not present in the array.

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!