Update #include <iostream> #include <fstream> #include <cstdlib> #include <ctime> using namespace std; class Control { private: int arr[1000]; int size = 1000; public: Control() { srand(time(NULL)); ifstream file("numbers.txt"); if (file.is_open()) { for (int i = 0; i < size; i++) { file >> arr[i]; } file.close(); } else { cout << "Unable to open file." << endl; } for (int i = 0; i < size; i++) { arr[i] = rand() % 1000 + 1; } } void outputAll() { for (int i = 0; i < size; i++) { cout << arr[i] << " "; } cout << endl; } void outputSum() { int sum = 0; for (int i = 0; i < size; i++) { sum += arr[i]; } cout << "Sum: " << sum << endl; } void outputOdd() { cout << "Odd numbers: "; for (int i = 0; i < size; i++) { if (arr[i] % 2 != 0) { cout << arr[i] << " "; } } cout << endl; } void outputEven() { cout << "Even numbers: "; for (int i = 0; i < size; i++) { if (arr[i] % 2 == 0) { cout << arr[i] << " "; } } cout << endl; } void linearSearch(int val) { bool found = false; for (int i = 0; i < size; i++) { if (arr[i] == val) { found = true; cout << "Value found at index " << i << endl; break; } } if (!found) { cout << "Value not found." << endl; } } void outputMiddle() { int middle = size / 2; cout << "Middle value(s): "; if (size % 2 == 0) { cout << arr[middle - 1] << " " << arr[middle] << endl; } else { cout << arr[middle] << endl; } } void outputFirst() { cout << "First value: " << arr[0] << endl; } void outputLast() { cout << "Last value: " << arr[size - 1] << endl; } void outputHighest() { int highest = arr[0]; int index = 0; for (int i = 1; i < size; i++) { if (arr[i] > highest) { highest = arr[i]; index = i; } } cout << "Highest value: " << highest << " (index " << index << ")" << endl; } void outputLowest() { int lowest = arr[0]; int index = 0; for (int i = 1; i < size; i++) { if (arr[i] < lowest) { lowest = arr[i]; index = i; } } cout << "Lowest value: " << lowest << " (index " << index << ")" << endl; } void bubbleSort() { for (int i = 0; i < size - 1; i++) { for (int j = 0; j < size - i - 1; j++) { if (arr[j] > arr[j + 1]) { int temp = arr[j]; arr[j] = arr[j + 1]; arr[j + 1] = temp; } } } cout << "Array sorted in ascending order using bubble sort." << endl; } }; int main(){ Control c; c.outputAll(); c.outputSum(); c.outputOdd(); c.outputEven(); c.outputFirst(); c.outputLast(); c.outputMiddle(); c.linearSearch(); c.outputLowest(); c.outputHighest(); } Create a conventional structure for C++ Program Header File (Outline / Framework of C++ Class File) Driver File (File Containing Main Function) Class Implementation File Make Sure all the files are organized in the same directory. Main Function: Control of operation Common_Alg The array will be a Class Variable {Implement Dynamic array) In your Class declare and fill an array with 1000 random integers between 1 - 1000 from your .txt file used in previous tasks. Filling the array with random integers should happen in the class constructor. ***Hint: use the class constructor. The algorithm outputs .