Question: You should already have a class called Numbers from the first exercise. Add the following methods to it . An instance method called randomize (

You should already have a class called Numbers from the first exercise. Add the following methods to it.
An instance method called randomize() that creates and assigns random number in the range 0 to 100 to the elements of the encapsulated array (hint, look up the java.util.Random class).
Create methods called bubbleSort(), selectionSort(), and insertionSort(). They should perform the appropriate kind of sort on the data in your array.
In your NumbersDriver class, do the following:
Create a Numbers object with 10 elements.
Call the randomize method.
Display the contents of the array.
Call the bubbleSort method.
Display the contents of the array.
Call the randomize method.
Display the contents of the array.
Call the selectionSort method.
Display the contents of the array.
Call the randomize method.
Display the contents of the array.
Call the insertionSort method.
Display the contents of the array.
Clearly explain in your output what you are doing. Submit your project via Canvas.

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!