Question: Homework 7: Concurrency Overview: For this assignment you will need to write a program that will visually illustrate selection sort, insertion sort, and bubble sort.


Homework 7: Concurrency Overview: For this assignment you will need to write a program that will visually illustrate selection sort, insertion sort, and bubble sort. This program is to be used as an aid to help explain each algorithm to someone who has never seen them before. Therefore, you should have some way to visualize the data (see examples below), indicate in some way which values are currently being swapped, and have the animation be slow enough that someone not familiar with the algorithms can follow along with each step. You must invoke each sort method on a separate thread. You should create an array of integers 1, 2, 3, ., 49, 50. Shuffle the values in the array randomly and have each algorithm start with the same array. The initial arrays should be different each time the application is run Display There are many ways to display these algorithms working. To help illustrate the types of animations we are looking for please view the following websites https://www.toptal developers/sorting-algorithm n.wikipedia.org/wiki/Bubble sort https://en.wikipedia.o tps://en.wikipedia.o However, your choice to display your array and how the sorting is taken place must be the same for all 3 algorithms and all 3 algorithms must be displayed and running at the same time. Note that while you do get to choose how the display will look we will take off points if your display is unappealing to a broad audience If you would like to do something like the first example with drawing rectangles, see section 2.9 and 2.10 in your textbook. Sources: In addition to the websitested above there are several sources available on the internet for this. You are allowed to look up other sources and get inspiration. Remember that you must site all sources, neglecting to do so could result in a zero for this assignment. Tip: It might seem tempting to find a source and copy or implement what that source provides but remember for this assignment you must implement these 3 algorithms in separate threads and display all algorithms using the same display method. Experience shows that it can often be harder to take a different example and fix it to fit a given situation than it would be to start fresh with a good design Homework 7: Concurrency Overview: For this assignment you will need to write a program that will visually illustrate selection sort, insertion sort, and bubble sort. This program is to be used as an aid to help explain each algorithm to someone who has never seen them before. Therefore, you should have some way to visualize the data (see examples below), indicate in some way which values are currently being swapped, and have the animation be slow enough that someone not familiar with the algorithms can follow along with each step. You must invoke each sort method on a separate thread. You should create an array of integers 1, 2, 3, ., 49, 50. Shuffle the values in the array randomly and have each algorithm start with the same array. The initial arrays should be different each time the application is run Display There are many ways to display these algorithms working. To help illustrate the types of animations we are looking for please view the following websites https://www.toptal developers/sorting-algorithm n.wikipedia.org/wiki/Bubble sort https://en.wikipedia.o tps://en.wikipedia.o However, your choice to display your array and how the sorting is taken place must be the same for all 3 algorithms and all 3 algorithms must be displayed and running at the same time. Note that while you do get to choose how the display will look we will take off points if your display is unappealing to a broad audience If you would like to do something like the first example with drawing rectangles, see section 2.9 and 2.10 in your textbook. Sources: In addition to the websitested above there are several sources available on the internet for this. You are allowed to look up other sources and get inspiration. Remember that you must site all sources, neglecting to do so could result in a zero for this assignment. Tip: It might seem tempting to find a source and copy or implement what that source provides but remember for this assignment you must implement these 3 algorithms in separate threads and display all algorithms using the same display method. Experience shows that it can often be harder to take a different example and fix it to fit a given situation than it would be to start fresh with a good design
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
