Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please write the code in c++ Write a program that will - Greet the user, describe your program, and invite the user to try it

please write the code in c++
image text in transcribed
image text in transcribed
Write a program that will - Greet the user, describe your program, and invite the user to try it (user can say no) - Implement Selection, Insertion, optimized Bubble, Merge and Quick sorting algorithms. - For all search algorithms, use the text or the class-developed version as starter code, adapted for your data. Be sure to provide proper credit to the developers (such as the text or your colleagues) as needed. DO NOT use online versions. Using online versions may result in 0 points for this assignment - Read in 2 data text files of different lengths. Choose from your favorite literature, speeches, or other works. One file is at least 5000 words and the other needs to be at least 5 times larger. Combining multiple files into one longer file is fine, but they should not repeat. The program will parse the files into words and prepare data for sorting by eliminating all occurrences of "a", "an", "be", "the". Give your text files meaningful names. - Allow the user to choose between 2 options: All algorithms Compare one n2 algorithm and one nlog(n). If the user chooses this option, randomly choose one n2 algorithm and one nlog(n) algorithm to compare. - Sort the data in following scenarios and provide timing comparisons using the high resolution clock class. Sort unsorted data from shorter file with the selected algorithms, 5 times each. Record each time and calculate the average. Sort unsorted data from longer file with the selected algorithms, 5 times each. Record each time and calculate the average. Sort sorted data from shorter file with the selected algorithms, 5 times each. Record each time and calculate the average. Sort sorted data from longer file with the selected algorithms, 5 times each. Record each time and calculate the average. - Output the time results in an organized table format. Design a table that is user friendly and allow a convenience comparison of sorting times. Include a short dynamic sentence for the user that describes the results and whether they are expected. This descriptive sentence should be based on the results. - Print the first 50 words of your sorted list and the last 50 words of your sorted list. - Allow user to repeat or quit

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions