This is a really basic graphical animation based on the Bubble Sort.
- When the program starts, it asks the user for the number of numbers required.
- Then it accepts input of numbers x number of times until it has the full list.
- Then it begins to sort the list using the Bubble Sort.
- It starts from the first number in the list, comparing it to the next number in line.
- If the first number is greater than the next number, it swaps them. If not, it moves on to the next number and compares it to the next number after it, and so on.
- As the checking progresses down the list until it reaches the end, this is known as a pass. the total number of swaps for that pass is recorded.
- At the end of the pass, if the number of swaps is more than 0, the process begins all over again.
- If the number of swaps is 0, the list is sorted.
- When all is sorted, it displays the sorted list along with other data such as the number of swaps and how many passes it took.