Question: For this project, you will implement three sorting algorithms and compare their performance. Unlike previous assignments, you are starting from scratch without starter code. You

For this project, you will implement three sorting algorithms and compare their performance. Unlike previous assignments, you are starting from scratch without starter code. You may complete this project with a partner. See deliverables for details.
You will use the provided file containing airport flight data.This flight data is currently grouped by destination airport ID code. Your task will be to sort the data in alphabetical order based on origin airport code, using the destination ID as a tiebreaker.
You will write three functions to accomplish this.
BubbleSort(Entry* entry, int size);
QuickSort(Entry* entry, int size);
MergeSort(Entry* entry, int size);
You will read each line of the file into the program and store it in a struct called Entry. It is up to you to decide what this struct should look like. These Entries will be placed in an array. The array will then be fed to the three sorting functions. These functions should sort the data using the corresponding algorithm, and then write the sorted contents to a new file called FunctionName.csv (where FunctionName is the name of the function used to sort). Make sure the output file includes the first label row from the input.
Data should be sorted in alphabetical order based on Origin_airport, and ties should be decided by Destination_Airport.
Example
Unsorted Data
AAA, BBB, additional data in row
BBB, DDD, additional data in row
AAA, BCC, additional data in row
Sorted Data
AAA, BBB, additional data in row
AAA, BCC, additional data in row //BCC comes after BBB alphabetically!
BBB, DDD, additional data in row
Additionally, your main will track the time it takes each function to complete its job, then print the names of the functions along with their times, ranked 1-3 from fastest to slowest.
Sample Output
>./myprogram.exe
> BubbleSort: Complete
> QuickSort: Complete
> MergeSort: Complete
>
> Final Times
>1. MergeSort 1.123456 seconds
>2. QuickSort 2.123456 seconds
>3. BubbleSort 10.123456 seconds
This project is graded out of 50 points
Read file into an array of structs. 10pts
BubbleSort 10pts
QuickSort 10pts
MergeSort 10pts
Time and reporting 5pts
Makefile 5pts

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!