Question: Instructions: Write a program that does the following: Defines a class named Data that has the following members a . An ArrayList of integers entitled
Instructions:
Write a program that does the following:
Defines a class named Data that has the following members
a An ArrayList of integers entitled numbers Private
b Methods Public:
i DisplayMenu Prompts the user to choose one of the following
Quit
Input Numbers
Display Numbers
Search Numbers
Delete Numbers
ii InputNumbers Allows user to push integers onto the ArrayList entitled numbers
iii. DisplayNumbers Outputs the content of the ArrayList numbers
iv SearchNumbers Searches the numbers ArrayList and outputs the index of where it is found; it outputs a message that it was not found otherwise
v DeleteNumbers deletes all integers in the ArrayList numbers
Define each method.
Define a main method that makes use of all members of a Data object. Allow the user to continue until they indicate that they want to quit.
Feel free to add additional methods.
Sample Run on next page:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
