Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 to 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 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started