Question
Objective: To use Random object, External output file and to implement different versions of Bubble Sort (Intuitive algorithm improvement) Input: Array of 150 integers from
Objective: To use Random object, External output file and to implement different versions of Bubble Sort (Intuitive algorithm improvement)
Input: Array of 150 integers from 0 to 200, whose content is generated by a Random object.
Output: A data (external) file named teamout.txt (FabFourout.txt, if your team name is FabFour). The output file (teamout.txt) should contains both the original array and the sorted array.
Example
Original Array
45 | 16 | 2 | 23 | . . . | 11 | 198 | 5 | 39 | 68 |
Sorted Array
2 | 5 | 11 | 16 | . . . | 23 | 39 | 45 | 68 | 198 |
Note:
You may write the three versions of Bubble Sort in the same program file or you can choose to write three different program files.
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