Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Your C++ program will sort and provide time comparisons (using the high resolution clock class) for the first 5000 and 10000 words from books of

  1. Your C++ program will sort and provide time comparisons (using the high resolution clock class) for the first 5000 and 10000 words from books of literature

    1. Locate text files of at least 2 works of literature. These are your data files. (Different text files are expected from each student.) Allow the user the choice of which book they would like to use as the sample.

    2. Implement sort algorithms with 2 efficiency of O(n2)and 2 sort algorithms with efficiency of O(n log n).

    3. Allow user to choose 5000 or 10000 sample size.

    4. Parse words from your chosen books to fill an array of the the chosen sample size. Be

      sure to clean up your data as needed.

    5. Sort the list of words alphabetically and time each sort.

    6. Run each sort algorithm at least 5 times to sort unsorted data. Measure the times for

      each sort. Provide the user with these sort times for each algorithm in a table-like

      column format for easy readability.

    7. Run each sort also against a sorted list and provide times.

    8. The user should be informed of all the significant step in your program ,i.e.,output a

      statement such as Program start ...., Reading word list from file...., etc.

    9. Allow the user to choose to see the first 100 words on the list or the last 100 words on

      the list.

    10. Allow the user to repeat or quit.

    11. Be prepared to discuss all the time data in your report. All time measurements should

      only include time to search, and not include other times like reading from text files, parsing, loading into array, etc.

Be sure that your program is well written, includes at least 4 meaningful functions outside of main, and is effectively documented in header and throughout. The program must use function declarations with function definitions after main(). Use only local variables. The C++ library function random_shuffle may be helpful.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Advanced Database Systems

Authors: Carlo Zaniolo, Stefano Ceri, Christos Faloutsos, Richard T. Snodgrass, V.S. Subrahmanian, Roberto Zicari

1st Edition

155860443X, 978-1558604438

More Books

Students also viewed these Databases questions

Question

Explain the skills and abilities required for event management.

Answered: 1 week ago

Question

CL I P COL Astro- L(1-cas0) Lsing *A=2 L sin(0/2)

Answered: 1 week ago