Question: update the program to this Modify 2.cpp. Add Sort menu item. The sort menu item will use the Radix algorithm to sort the data. Modify

update the program to this Modify 2.cpp. Add Sort menu item. The sort menu item will use the Radix algorithm to sort the data. Modify the Min / Max menu options to be O(1). Save the file as 3.cpp and also the number of iteration should be 50 Data.txt can be any 50 integers modifying the file 2.cpp #include  #include  #include  using namespace std; #define MAX_SIZE 50 void createData(){ srand(time(0)); // set the seed for the random ofstream outfile("data.txt"); // open the file data.txt if not opened show error if (!outfile){ cout<<"Some error occured in opening file data.txt"<remainingMax) return arr[n-1]; else return remainingMax; } } void display(int arr[], int size){ cout<>choice; switch(choice){ // swich choice case 1: createData(); break; case 2: { ifstream infile("data.txt"); // open the file if not opened show error if (!infile){ cout<<"Some error occured in opening file data.txt"<> temp){ arr[n++] = temp; } display(arr,n); break; } case 3: { ifstream infile("data.txt"); // open the file if not opened show error if (!infile){ cout<<"Some error occured in opening file data.txt"<> temp){ arr[n++] = temp; } int minimum = getMin(arr,MAX_SIZE); cout<<"Minimum value: "<> temp){ arr[n++] = temp; } infile.close(); int maximum = getMax(arr,MAX_SIZE); cout<<"Maximum value: "<                                            

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!