Question: This is an exercise to practice with Java in preparation for using higher level data structures. Create a Java project that allocates an array and
This is an exercise to practice with Java in preparation for using higher level data structures.
Create a Java project that allocates an array and prompts the user to enter a series of positive integers that are stored in the array. This should continue until the user enters indicating they are done providing values.
Create a new class called BubbleSort. Implement an object method that takes in an array, sorts it and returns the sorted array. This should be your own implementation of Bubble Sort, not something off the web. This is a common interview question you should be able to do quickly by this point!
Create a new class called Statistics with a static method called GetMedian. It takes, as a parameter, a sorted array and returns the median value.
In your main after collecting the values, instantiate BubbleSort and call your sorting method to sort the array. Then call the static method GetMedian and print out the median value.
As usual, ZIP up just your java files and submit
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
