Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ You will create an array manipulation program that allows the user to do pretty much whatever they want to an array 1. When the

image text in transcribedC++

You will create an array manipulation program that allows the user to do pretty much whatever they want to an array 1. When the program begins, you will prompt the user for an initial size of the array, then the values to fill the array. Your array will contain ints. 2. After the user fills the initial array, present the user with a menu, detect their choice, and provide them any needed follow up prompts that are needed. 3. Continue until they want to quit Menu Option Description The user will provide a position to insert a value You must obtain a valid position before moving on . Obtain the value to insert and insert it into the array NOTE: The array will be one element larger after The user will provide a position to remove a value You must obtain a valid position before moving on Once you have a valid position, remove that value .NOTE: The array will be one element smaller after Insert Remove Obtain a value from the user Count . Tell them how many times that value is in the array Print the contents of the array in the following format: Print Exit Exits the program Sample Menu Remember, this menus comes after the user fills the initial array. Make a selecticon 1) Insert 2) Remove 3) Count 4) Print 5) Exit Choice Additional Requirements For each of the options the user has access to, create a function to handle the work involved. int insert(int arrl, int& size, int value, int position) . Inserts the given value at the specified position . Creates a new array, copies all old value over adjusting indices as necessary . Deletes the old array (arr) . Updates the size .Retums a pointer to the new array e int remove(int arr. int& size, i nt position) . Removes the value at the given position . Creates a new array, copies all old value over adjusting indices as necessary .Deletes the old array (arr) Updates the size . Retums a pointer to the new array . returns a count of how many times the target value is in the array . Prints array as required int countint arr1, int size, int target) . void printint arr]. int size)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

3. Give that person the feedback, that is, say it to the person.

Answered: 1 week ago