// READ BEFORE YOU START: // Please read the given Word document for the project description with an illustrartive diagram. // You are given a partially completed program that creates a list of dogs for an adoption shelter. // Each dog has the corresponding information: name, breed, and a linked list of checkups. // Please read the instructions above each required function and follow the directions carefully. // If you modify any of the given code, return types, or parameters, you risk failing test cases. // // Note, Textbook Section 2.10 gives a case study on complex linked list operations. // This project is based on that case study. Make sure you read the code in section 2.10. // The following will be accepted as input in the following format: \"name:breed\" // Example Input: \"Spot:Terrier\" or \"Daisy:Poodle\" // Valid name: String containing alphabetical letters beginning with a capital letter // Valid breed: String containing alphabetical letters beginning with a capital letter // Valid date: String in the following format: \"MM/DD/YYYY\" ex: \"01/01/2010\" // All input will be a valid length and no more than the allowed number of dogs will be added to the linked list. #include #include #include #include // included to check for memory leaks #define CRTDBG_MAP_ALLOC #include #pragma warning(disable: 4996) // used to create a linked list of containers, each contaning a \"dog\" struct container { struct dog *dog; struct container *next; } *list = NULL; // used to hold dog information and linked list of \"checkups\" struct dog { char name[30]; char breed[30]; struct checkup *checkups; }; // used to create a linked list of checkups containing \"dates\" struct checkup { char date[30]; struct checkup *next; }; // forward declaration of functions that have already been implemented void flush(); void branching(char); void helper(char); void remove_all(struct container*); void display(struct container*); // the following forward declarations are for functions that require implementation // return type // name and parameters // points void add_dog(char*, char*); // 5 struct dog* search_dog(char*); // 5 void add_checkup(char*, char*); // 10 char* last_checkup(char*); // 15 void remove_one(char*); // 15 // Total: 50 points for hw07 struct container* list_of_breed(char*); // 25 struct container* list_by_name(); // 25 // Total: 50 points for hw08 int main() { char ch = \'i\'; printf(\"Dog Adoption Center\ \ \"); do { printf(\"Please enter your selection:\ \"); printf(\"\\ta: add a new dog to the list\ \"); printf(\"\\ts: search for a dog on the list\ \"); printf(\"\\tr: remove a dog from the list\ \"); printf(\"\\tc: add a checkup date for dog\ \"); printf(\"\\tl: display last checkup for a dog\ \"); printf(\"\\tn: display list of dogs by name\ \"); printf(\"\\tb: display list of dogs of breed\ \"); printf(\"\\tq: quit\ \"); ch = tolower(getchar()); flush(); branching(ch); } while (ch != \'q\'); remove_all(list); list = NULL; _CrtDumpMemoryLeaks(); .