CS246 Homework 5a: Revision
Due: Monday, March 19
Things to note:
- This is an individual project, unless your hw4 was done with a group.
- In addition to the new requirements, anything that was not working properly in hw4 should be fixed by now.
What to hand in:
- Include proper README and header file
- Paper print out and electronic tar file copied to /home/dxu/submissions/cs246 as usual.
- Write-up in Latex (print out only)
Rewrite your hw4 [50pts]
Rewrite your homework 4 so that it is as modular, efficient and readable as you can possibily make it. Reorganize your data structure if you need to. Refer to the partial solution given out for ideas.
Address the following in you revision and write-up:
- Are there any integers not #defined, why not?
- How many times do you read each file (the answer should be one)?
- How reable is your code with or without comments? Remember you should try to write code that doesn't need (much) commenting in the first place. Recruit a classmate and do a readability-test.
- What do you need to do to change your program so that we search and report for "Elizabeth" instead of "Precious" (the answer should be one change of a single string "Precious" to "Elizabeth", top of the .c or .h)?
- How much work does it take to adapt your program if an additional 500 input files (of the same format) are added, i.e does your program scale easily?
- How much work does it take to adapt your program if we are interested in searching for 500 names rather than 7?
- What is the run time and size of data structure of your original hw4 - do a proper analysis, not just a rough estimate. What is the run time and size of data structure after revision?
Do not take the solution and start from there. Instead, use the solution as a guide, identify aspects of your code that can be improved and proceed from there. Handing in the solution as your revision will receive no credit.
Create a write-up reporting on what changes you made and why.