Question: // Q1 : add (20 points) // This function is used to add a book into the list. You can simply add the new book

 // Q1 : add (20 points) // This function is used

// Q1 : add (20 points) // This function is used to add a book into the list. You can simply add the new book to the end of list (array of structs). // Do not allow the book to be added to the list if it already exists in the list. You can do that by checking book names AND IDs already in the list. // If the book already exists then return without adding it to the list. If the book does not exist in the list then add the book at the end of the list and return 1. // If book list is full, then do not add new book to the list and return 2. // NOTE: Notice how return type of add() is checked in case 'a' of executeAction() // NOTE: You must convert the string 'booktype_input' to an enum type and store it in the list because the booktype has enum type (not string type). // The list should be case sensitive. For instance, 'Roger' and 'roger' should be considered two different names. // Hint: 'count' holds the number of books currently in the list int add(char* bookTitle input, charauthor_input, char booktype_input, unsigned int bookId_input, unsigned int aisle_input) { // Enter code here return; // edit this line as needed > book. // This function displays the book list with the details (struct elements) of each void display char* booktypeString = "Nonfiction"; { // display // display dummy init for (int i = 0; i

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!