Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a program that implements the following pseudo code: Declare and initializ

ID: 3635056 • Letter: W

Question

Write a program that implements the following pseudo code:

Declare and initialize arrays/variables
Display menu.
1. Create a dynamic array of random elements (array size indicated by the user) and write it into a file indicated by the user.
2. Load a dynamic array of elements from a file indicated by the user
3. Sort the array
4. Display the array
5. Exit

If menu choice 1 Call a function to populate the array:

Ask the user for the number of elements (size of the array)
Ask the user for a seed (a seed is any positive integer)
Generate a dynamic array of random numbers from the set
{5, 10, 15, 20, …, 95, 100}

Ask the user for file name
Call a function to write the content of the array into the specified file.
Display a prompt for successful operation

Else if menu choice 2
Ask the user for the file name
Call a function to load the content of the file into a dynamic array of elements
Display a prompt for successful operation
Else if menu choice 3
Call a selection sort function to sort the current array
Else if menu choice 4
Call a function to display the content of the current array on a single line with elements separated by | (Important: no | after the last element)
Else if menu choice 5
Display an exit message
Else
Display an error on input prompt
If not an exit condition
Display the menu again


No global variables/arrays are allowed.

Explanation / Answer

Dear Friend here is the program u want PLEASE RATE #include #include #include #include #include using namespace std; void write(string &name,int arr[],int &size) { ofstream myfile; myfile.open(name.c_str()); if(myfile.is_open()) { for(int i=0;i
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote