Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

a. BrowserList newBrowserList() which allocates the memory for a new b. void fre

ID: 3592853 • Letter: A

Question

a. BrowserList newBrowserList() which allocates the memory for a new b. void freeBrowserList(BrowserList browserList) which frees the memory used c. void goToURL(BrowserList browserList, Element element) which will adda BrowserList, initializes its variables, and returns its address. for the BrowserList (including its DoublyLinkedList). node in the DoublyLinkedList that stores element after pCurrentURL (any nodes that were in the list after pCurrentURL should be removed from the list) and updates pCurrentURL to point to the new node

Explanation / Answer

#include #include #include #include //#define constant values #define MAX_URL_LENGTH 50 #define TRUE 1 #define FALSE 0 //typedef for the Element struct which constains a c string to store a URL in the BrowserList typedef struct { char szURL[MAX_URL_LENGTH]; } Element; //Typedef for a node in the doubly linked list (has next and previous pointers). typedef struct NodeDL { Element element; struct NodeDL *pNext; struct NodeDL *pPrev; } NodeDL; //Typedef for a doubly linked list implementation. //Contains a pointer to the first node in the list and the last node in the list (pHead and pFoot respectively). typedef struct { NodeDL *pHead; NodeDL *pFoot; } DoublyLinkedListImp; typedef DoublyLinkedListImp *DoublyLinkedList; /typedef for a BrowserListImp which stores a DoublyLinkedList of all of the URLs visited plus a pointer //to the node containing the current webpage. typedef struct { DoublyLinkedList list; NodeDL *pCurrentURL; } BrowserListImp; typedef BrowserListImp *BrowserList;
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote