CMSC 216 Exercise #4 Spring 2019PhotoAlbum Due: Wednesday March 27, 2019, 11:30PM1 ObjectivesTo practice dynamic memory allocation.2 OverviewThe first thing you need to do is to copy the directory photoalbum we have left in the grace cluster underthe exercises directory. Remember that you need that folder as it contains the .submit file that allows you tosubmit.3 SpecificationsFor this exercise you will implement functions that support a photo album application. The prototypes for thefunctions can be found in the photoalbum.h file.1. Photo *create photo(int id, const char *description) - Returns a dynamically-allocated Photo structureinitialized based on the provided parameters. If the description parameter is different from NULL, thefunction will dynamically allocate memory for the description and copy the description. If descriptionis NULL, no memory allocation will take place and the description field will be initialized to NULL. Thefunction will return NULL if a memory allocation fails. You don’t have to worry about freeing memoryif any memory allocation fails (e.g., one memory allocation was successful, but a second one fails).2. void print photo(Photo *photo) - Prints a photo id and the description. If the description is NULL, themessage description message will be ”None”. The function will perform no task if the photo parameteris NULL. See the public tests for information regarding output format.3. void destroy photo(Photo *photo) - Deallocates any dynamically-allocated memory associated with thephoto parameter. The function will perform no task if the photo parameter is NULL.4. void initialize album(Album *album) - Initializes the album size to 0. You can assume this function willnot be called on an album that has already been initialized. The function will perform no task if thealbum parameter is NULL.5. void print album(const Album *album) - Prints the contents of the album. If the album has no photosthe message ”Album has no photos.” will be printed. The function will perform no task if the albumparameter is NULL. See the public tests for information regarding output format.6. void destroy album(Album *album) - Deallocates any dynamically-allocated memory associated withthe album and sets the album size to 0. The function will perform no task if the album parameter isNULL.7. void add photo to album(Album *album, int id, const char *description) - Appends (to the end of thearray) a photo if there is enough space (if the album size is less than MAX ALBUM SIZE). No photowill be added if a photo cannot be created. The function will perform no task if the album parameter isNULL.You may want to take a look at the public tests in order to understand the functionality associated with thefunctions above.14 Requirements1. It is your responsibility to verify that your program generates the expected results in the submit server.2. Your code must be written in the file photoalbum.c.3. Do not add a main function to the photoalbum.c file.4. Use the provided makefile to build public tests.5. All your C programs in this course should be written using the compiler gcc, with the options definedin the gcc aliases info.txt file. This file can be found in the info folder of the public grace account.6. Your program should be written using good programming style as defined athttp://www.cs.umd.edu/~nelson/classes/resources/cstyleguide/7. You just need to implement the functions described above. You may add additional functions if youwant, but define them as static.8. You may not change the photoalbum.h file provided.9. You are encourage to define your own tests (files similar to the public01.c, public02.c, etc. files provided).10. You don’t need to use the macros SUCCESS and FAILURE you will find in the photoalbum.h file.11. Using valgrind to detect memory problems can be very helpful.12. To check for memory problems you either use our memory tool (my memory checker) or valgrind, butnot both. If you want to run valgrind you must comment out the function calls start memory check()and stop memory check() you will find in the public tests.5 Submitting your assignment1. In the assignment directory (photoalbum) execute the command submit.2. Your assignment must be electronically submitted by the date and time above to avoid losing credit. Seethe course syllabus for details.6 Grading CriteriaYour assignment grade will be determined with the following weights:Results of public tests 70%Results of release tests 30%Notice that even though we will not look at your code, we expect good style in your code.7 Academic integrity statementPlease carefully read the academic honesty section of the course syllabus. Any evidence of impermissiblecooperation on assignments, use of disallowed materials or resources, or unauthorized use of computer accounts,will be submitted to the Student Honor Council, which could result in an XF for the course, or suspensionor expulsion from the University. Be sure you understand what you are and what you are not permittedto do in regards to academic integrity when it comes to assignments. These policies apply to all students, andthe Student Honor Council does not consider lack of knowledge of the policies to be a defense for violatingthem. Full information is found in the course syllabus– please review it at this time.2本团队核心人员组成主要包括硅谷工程师、BAT一线工程师,精通德英语!我们主要业务范围是代做编程大作业、课程设计等等。我们的方向领域:window编程 数值算法 AI人工智能 金融统计 计量分析 大数据 网络编程 WEB编程 通讯编程 游戏编程多媒体linux 外挂编程 程序API图像处理 嵌入式/单片机 数据库编程 控制台 进程与线程 网络安全 汇编语言 硬件编程 软件设计 工程标准规等。其中代写编程、代写程序、代写留学生程序作业语言或工具包括但不限于以下范围:C/C++/C#代写Java代写IT代写Python代写辅导编程作业Matlab代写Haskell代写Processing代写Linux环境搭建Rust代写Data Structure Assginment 数据结构代写MIPS代写Machine Learning 作业 代写Oracle/SQL/PostgreSQL/Pig 数据库代写/代做/辅导Web开发、网站开发、网站作业ASP.NET网站开发Finance Insurace Statistics统计、回归、迭代Prolog代写Computer Computational method代做因为专业,所以值得信赖。如有需要,请加QQ:99515681 或邮箱:[email protected] 微信:codehelp