Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Databases On The Web Learn To Create Web Pages That Interface With Database Engines

Authors: Robert Papaj, Donald Burleson

11th Edition

1576100995, 978-1576100998

More Books

Students also viewed these Databases questions