Question: Add info(The string, fstream and sstream libraries are recommended. Be sure to include a blank list.txt in your submission) For this activity, you are required
Add info(The string, fstream and sstream libraries are recommended. Be sure to include a blank list.txt in your submission)

For this activity, you are required to provide files called act3.cpp as well as a makefile to compile and run it. In your file, act3.cpp, should have a skeleton of a main program as per normal which you will then fill it in as per the following. The objective of this activity is to demonstrate the bubble sort algorithm for arrays. You are going to implement this as a function with the following definition: string bubSort (double arr [8]) ; Your program will need to read in from a file called list.txt. On each line, will be a comma-delimited list of integer values. Each list will be 8 elements long. Your objective is to sort each of these lists using the bubble sort algorithm. Each line should be sorted, and then displayed in sorted (ascending order with the small- est element at the start of the string) one after the other. Each will be on a new line. As a hint, implementing a function to do the bubble sort itself will make the overall program easier to implement. For example: Given a list: 6.4,3.25,7.5,2.5, 1. 1, 11.6,0.5 The outcome of the sorting should be: 0.5, 1. 1,2.5,3.25,6.4,7.5, 11.6
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
