Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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. Display_Menu - Prompts the user to choose one of the following
0. Quit
Input Numbers
Display Numbers
Search Numbers
Delete Numbers
ii. Input_Numbers (Allows user to push integers onto the ArrayList entitled numbers)
iii. Display_Numbers (Outputs the content of the ArrayList numbers)
iv. Search_Numbers (Searches the numbers ArrayList 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 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]:
image text in transcribed

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

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Write a Python program to check an input number is prime or not.

Answered: 1 week ago

Question

Write a program to check an input year is leap or not.

Answered: 1 week ago

Question

Write short notes on departmentation.

Answered: 1 week ago

Question

What are the factors affecting organisation structure?

Answered: 1 week ago

Question

9. Describe the characteristics of power.

Answered: 1 week ago

Question

3. Identify and describe nine cultural value orientations.

Answered: 1 week ago