Description
The following figure shows an instance of the linked list that you will be building and managing in these two homeworks. The node of the main linked list ‘list’ is called libraryList, which contains two members: (1) book member is a pointer to the book node, (2) a pointer to next libraryList node. The book node contains three members: (1) book title, (2) aisle number, and (3) a pointer to bookType list. The node in the bookType list has two members: (1) book type (2) a pointer to next bookType node.
HW 7 Programming Assignment
You are given a partially completed program hw7.c. You should follow the instructions given in the program to complete the functions so that the program executes properly. You will be completing a program that creates a list of books. It is a menu driven program where user is given following options:
- Add an book’s information (Book title and aisle number) is already implemented. The new book is added to the head of the linked list. We do not ask user for bookTypes to add in this function. So simply NULL is assigned to *bookType member of the ‘book‘ node when a new book is added to the list in this function. (Note: *bookType is used in further functions)
- Display the book list is already implemented. This function prints each book’s title and aisle number. It does not print bookType of the book.
These functions need to be implemented:
- Search a book in the list by book title. It prints if the book exists on the list or not. This function should return the ‘book‘ node if that book is found in the list, else return NULL. It is used as a helper function in executeAction() to check if the book exists in the list.
The next part focuses on using ‘bookType’ linked list. In this part, the user should be able to use the following menu options:
- Add a bookType to an book’s profile. This function assumes that the book is added in the list and assigns book type using the *bookType member of ‘book’ node. You may add the new bookType to the head or tail of the ‘bookType’ linked list. (Sample solution adds the bookType to the tail)
- This function prompts the user to input a book type. Then it displays the list of books that have the entered book type only. Lastly, it should display the number of books that met this requirement. This function should display both book’s title and aisle number. See expected output below.
Removes the book from the list. This function removes the book’s title, aisle number and bookType list of the book when removing the book from the list




