Question: Write a C++ program and utilize a class that will read random number data from the .txt file. Your program will read data from the

Write a C++ program and utilize a class that will read random number data from the .txt file.

Your program will read data from the file and push into an array.

Once data is in the array create methods that will output values.

  • Attach Snipping Photo of Source Code and Output

    • Make sure to include a photo of each method executing.

  • Attach Snipping Photo of Text File

Method 1:

Output all values

Method 2:

Output the sum of all values

Method 3:

Output all odd numbers

Method 4:

Output all even numbers

Method 5:

Output Middle Value (Values in the Middle)

Not Average

Method 6:

Output First Value in the Array

Method 7:

Output Last Value in the Array

Method 8:

Output the Highest Value and its location in the array. (Hardcode the algorithm.

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:

Harcode and Implement Binary Search Algorithm.

Allow user to input value to search.

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!