Question: Implement a class to create a program that will generate 1000 random integers between 1 - 1000 and write into a file. Implement a file

Implement a class to create a program that will generate 1000 random integers between 1 - 1000 and write into a file.

Implement a file buffer and Hardcode algorithms for Linear Search, Middle Value, First Value, Last Value, Highest Value, Lowest Value, and Bubble Sort.

Main Function: Read random 1000 random integers from a .txt file.

The class will contain the methods below and an array as the data structure.

Method or Function 1:

Output all values

Method or Function 2:

Output the sum of all values

Method or Function 3:

Output all odd numbers

Method or Function 4:

Output all even numbers

Method or Function 5:

New

Enter a search value / Implement Linear Search

Method or Function 6:

New

Output Middle Value (Values in the Middle)

Not Average

Method or Function 7:

New

Output First Value in the Array

Method or Function 8:

New

Output Last Value in the Array

Method or Function 9:

New

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

Method or Function10:

New

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

Method or Function 11:

New

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

Please use comments to identify constructors and methods in the program.

Language is in python

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!