Question: Write a program that does the following: 1. Defines a class named Data that has the following members a. A vector of integers entitled numbers

Write a program that does the following:

1. Defines a class named Data that has the following members

a. A vector of integers entitled numbers (Private)

b. Methods (Functions) (Public):

i. Display_Menu Prompts the user to choose one of the following:

0. Quit

1. Input Numbers

2. Display Numbers

3. Search Numbers

4. Delete Numbers

ii. Input_Numbers (Allows user to push integers onto the vector entitled numbers)

iii. Display_Numbers (Outputs the content of the vector numbers)

iv. Search_Numbers (Searches the numbers vector and outputs the index of where it is found; it outputs a message that it was not found otherwise)

v. Delete_Numbers(deletes all integers in the vector numbers)

2. Define each method. You do not need to define a constructor for this class.

3. Define a main function that makes use of all members of a Data object. Allow the user to continue until they indicate that they want to quit.

Example:

Write a program that does the following: 1. Defines a class named

ain Menu -Quit Input Numbers - Display Numbers Search Numbers - Delete Numbers Input Numbers How many numberS wiII you input? Input number 0 Input number 1- 9 Input number 2-3 Input number 3-> 2:2 Input number 4-4 ain Menu I - Quit Input Numbers - Display Numbers Search Number Delete Numbers earch Numbers hat number do you want to search for? 2 was found at position 3 Main Menu I- Quit - Input Numbers - Display Numbers Search Numbers - Delete Numbers

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!