C with access to sqlite database
Overview
Create the code and good unit tests to verify your implementation of the functions described in access_sqlite.c
c_sqlite zip file
Link to sqlite API
Submission
Place your completed ActivityJournal.txt, unit_tests.c, access_sqlite.c, and access_sqlite.h files in a directory named c_sqlite
at the top level of your git repo.
Grading
- This is 5% of your course grade with 100 points total.
- I expect you to spend up to about 2 hours working on the base assignment. You are encouraged to copy and modify the example code.
- If you reach 2 hours and do not wish to continue you must explain in detail the challenges you faced in your ActivityJournal.txt.
This will allow you to receive full credit. I will let you know if I feel your explanation is incomplete and you will have 24 hours
to submit an improved ActivityJournal with no penalty.
- You can earn up to 40 points additional. This translates to an overall course bonus of up to 2%.
- Your activity journal is the most important part of your submission (50 of the 100 points).
- (10 points) my_db_open function with unit tests
- (20 points) add_team function with unit tests
- (20 points) verify_team_exists function with unit tests
- If you complete all of the above you are eligible for extra credit:
- (20 points) Create a function that prompts the user for a new team name and city, adds that to the teams table, and verifies that it is added.
This function must return 0 for success, non-zero for failure. It fails if the name or city is blank or null. It also fails if the
combination of team and city already exists in the teams table.
- (20 points) Create a function creates a CSV file using the passed file name.
This file lists each player, their position, their team, and their team's city with one player per line.
The function must return failure (non-zero) if the passed file name is bad (NULL pointer or cannot be opened for write).
It returns 0 for success. Create the appropriate unit tests to verify this function.