Document Analysis Project in C Part 1
Overview
This first part of the project creates a set of library functions that implement a doubly linked
list. Implement the functions in the order specified below. You are required to submit your code after
completing each function. An extensive set of unit tests is included along with a Makefile.
Linked List Illustration
Development process
- Follow the Setup instructions at the bottom of this page.
- All of your code will be implemented in the linked_list_functions.c file. Detailed descriptions
of the operation of each function are included in this source code file. This is the only source code file that will be graded.
- Use valgrind to test your code. To get full credit valgrind must report no issues with your code.
- You are not allowed to make any changes to linked_list_functions.h, unit_tests.c, unit_tests.h, and main.c.
- You are not allowed to change the design of the functions in linked_list_functions.c.
- You will be graded on both the quality of your code and the number of provided unit tests that pass.
- Incremental development is required. You must submit your code after completing each function.
Do not start the next function until you get the previous function working. However, implement
get_previous_word and get_next_word at the same time.
- In your activity journal be sure to enter an estimate for each function before starting the code.
- Update your activity journal with your time spent and observations when implementing that one function.
- Submit your code when that function passes its unit tests. You must include your updated Activity Journal.
- Except as noted below do not start the next function until the previous function is working.
If you must continue with one or two tests still failing be aware that this may cause problems with the subsequent functions.
- Implement and submit the functions in this order:
- create_node
- valid_parameters
- add_node_at_head
- clear_linked_list
- add_node_after_current
- get_current_word
- get_previous_word and get_next_word -- implement both of these at the same time.
- find_word
Overall Evaluation
- ( 5) Overall code quality
- (15) valgrind status reporting. -3 point deduction per reported error up to -15 for 5 or more errors.
- ( 5) Incremental development with at least one submission per function
- ( 5) Correct submission and code compiles and links without warnings with provided Makefile
- ( 5) All unit tests run without crashing (no segment faults and no infinite loops)
- ( 5) create_node
- ( 5) valid_parameters
- (10) add_node_at_head
- (10) clear_linked_list including correct free of all allocated heap space
- (15) add_node_after_current
- ( 5) get_current_word, get_previous_word, and get_next_word
- (15) find_word
Setup
Create a directory analysis_part1 at the top of your GitLab repository.
In that directory download part1.zip.
Follow the usual procedure for unzipping, building using make, and executing the unit tests. Use valgrind frequently as you are
developing code to consistently build good code.