Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

JAVA. Build a database with numbers that can be sorted and searched with your program.This will have two classes; a main class and data class.

JAVA. Build a database with numbers that can be sorted and searched with your program.This will have two classes; a main class and data class.

The user will input five random numbers in the main class to be stored in a array. You must insert an instance of the data object within the main class to store the numbers array in a field of the database using its constructor.

Data Class configs:

Within the data class, use a bubble sort method that returns the data in ascending and descending. Call the method from the main and print the result.

Within the data class, use methods that will return min, max, and average. Call them from the main class and print.

Lastly in the data class, use a method that will search for a value via binary search and returns the index of the value. Call the method from the main class and print.

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

MySQL Crash Course A Hands On Introduction To Database Development

Authors: Rick Silva

1st Edition

1718503008, 978-1718503007

More Books

Students also viewed these Databases questions