# CSC2025 Quiz 6Fall 2013

This web page is http://www.bernstein-plus-sons.com/.dowling/CSC2025F13/CSC2025_Quiz_6.html

This is the sixth daily quiz to be taken or before Tuesday, 29 October 2013 You should need several hours to do this quiz properly, so it is being made available early. It involves some serious programming. Failure to make a solid effort on this programming will result in a midterm warning.

<==== Do this AFTER you've answered all the questions

You probably DON'T want to do this ===>

Please fill in the following information:

Name:

Email:

Skype ID:

Please answer the following questions on this form (or on a paper copy of this form).

1. Using words, not code, give the design of a program that will accept a text of arbitrary length preserving the line structure of the text, extract each of the words in the text recording both the word and the number of the line from which it was extracted, and then sort the word-line-number pairs in alphabetical order of the words and then in numeric order of the lines for each word. Your design must include a careful consideration of how to implement the sort, trying for a good balance of timing, space and coding complexity, and explaining your reasoning. You are to format the output like a book index. Explain how you will do that.

2. Now estimate the timing and space requirements of your code in terms of the number of words in the text and the average length of the words.

3. Now implement both the program you have designed and a test suite for that program. Post all of this on your course web site with detailed notes in your blog, and give the URLs here.

4. Now test your program both for accuracy of the results and for timing. If your test suite does not do a good job of testing both, improve your test suite until it does. Be sure to explain the relationship between your timing test results and your timing estimate in your blog. Give the URL of the blog entries relating to this question.

5. Explain the three most important things you learned from Dr. Garg's lecture 22

6. Explain the three most important things you learned from Dr. Garg's lecture 23

7. Explain the three most important things you learned from Dr. Garg's lecture 24

<==== Do this AFTER you've answered all the questions

You probably DON'T want to do this ===>

Revised 27 October 2013