$29
In this homework assignment, you will be imple-menting a mini realistic social-media application called CengBook, in C programming language. You are provided with stub code and some utility services in the homework bundle. The stub code contains some parts that are already implemented for you, and some functions that you should implement yourselves (marked with the comment TODO in the CengBook.c file). The Linux exe-cutable (64 bit) of my sample implementation is also provided in the homework bundle; you can run it to try various inputs and see how your implementation should respond (try to match the output syntax exactly).
Part One – CengBook (75 points)
Your implementation will help an administrator to register, delete, find, connect, disconnect, list, sort and visualize the users on CengBook, as well as to check for the shortest paths between users. For this purpose, you will just need to implement the parts marked with the comment TODO in CengBook.c file. Note that you need to study and fully understand the queue data structure and also
the utility services for this part, because you will need to make use of those services while implementing the missing parts in the CengBook.c file.
Part Two – Sorting and Searching Basics (20 points)
Write a report to explain how the sortBook and the shortestPath functions (implemented in Utilities.c file) work, in details. In your report, make sure to include and refer to some figures that represent the variables / data structures used in those functions, and also briefly trace each function on a simple / short example.
Part Three – Time Complexity Analysis (5 points)
How many (and what) operations are required in order to delete a user from CengBook? List and count all of the operations/tasks (try to come up with a parametric summation). Hint: Make sure to think thoroughly about all of the required tasks like removing this user from his/her followers’ friend lists, decrementing follower counts of this user’s friends, removing this user’s pointer from the list of pointers kept in the book, deallocating this user’s memory storage, etc.
Page 1 of 2
What to submit? (Use only ASCII characters when naming all of your files and folders)
We are only asking for just 2 files:
• The first file is the implemented CengBook.c file.
• The second file is the report that should have the name Report and an appropriate file extension (you may prepare your report in WORD or PDF formats).
You don’t need to submit the Queue.x or Utilities.x files, we already have copies of them.
Zip the 2 files above (tar also works, but I prefer Windows zip format if possible), name the compressed file as <ID>_<FullNameSurname> (with the correct extension of .zip or .tar) and submit it through COW. For example:
e1234567_SelimTemizer.zip
There are a number of design decisions and opportunities for enhancements and creative extensions that are deliberately left open-ended in this homework specification. We have enough time until the deadline to discuss your suggestions and make further clarifications as necessary. There will be bonuses awarded for all types of extra effort. Late submissions will NOT be accepted, therefore, try to have at least a working baseline system by the deadline. Good luck.
Page 2 of 2