Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need to complete the code to get the following output in c language with this given code snippet. Example Output: Please enter the Animation name:

Need to complete the code to get the following output in c language with this given code snippet.image text in transcribed

image text in transcribed

Example Output: Please enter the Animation name: Animation_1 MENU 1. Insert a Frame at the front 2. Delete last Prame 3. Edie a Frame 4. Report the Animation 5. Quit Insert a Prame in the Animation Please enter the Frame frameName: Frame_1 MENU CST 8219 - F19 - Assignment #0 1 Insert a Frame at the front 2. Delete last Frame 3. Edit a Frame 4. Report the Animation 5. Quit Insert a Frame in the Animation Plesse enter the Frame framelame: Frame_2 MENU 1. Inserta Frame at the front 2. Delete last Frame 3. Edit a Frame 4. Report the Animation 5. Quit Animation name is Animation_1 Report the Animation Image H0, file name Frame_2 Image #1, file name Frame_1 MENU 1 Insert a Frame at the front 2. Delete last Frame 3. Edit a Frame 4. Report the Animation 5. Quit Edita Frame in the Animation There are 2 Prame(s) in the list. Piense specity the index ( 4) to edit at :0 The name of this Prame is Frame_2. Whet do you wish to replace it with? Frame_ MENU 1. Inserta Frame at the front 2. Delete last Prame 3. Edit a Frame 4. Report the Animation 5. Quit Animation name is Animation_1 Repart the Animation Image H0, file name Frame_3 Image #1, file name Frame_1 MENU 1. Inserta Frame at the front 2. Delete last Frame 3. Edit a Frame 4. Report the Animation 5. Quit //_CrtsetDbgFlag(_CRTDBG_ALLOC_MEM_DF|_CRTDBG_LEAK_CHECK_DF); // in main, after local declarations //NB must be in debug build #include finclude #include typedef enum{FALSE = 0, TRUE} BOOL; struct Frame{ char* frameName; struct Frame* pNext; } ; typedef struct{ char* animationName; struct Frame* frames; }Animation; // Forward declarations void InitAnimation (Animation*); void InsertFrame (Animation*); void DeleteFrame (Animation*); void EditFrame (Animation*) ; void ReportAnimation (Animation*); void CleanUp (Animation*); int main (void) char response; BOOL RUNNING = TRUE; Animation RG; _CrtsetDbgFlag (_CRTDBG_ALLOC_MEM_DF || InitAnimation (&RG) ; CRTDBG_LEAK_CHECK_DF); while (RUNNING) printf( "MENU 1. scanf ("&c", &response); switch (response) Insert a Frame at the front 2. Delete last Frame 3. Edit a Frame 4. Report the Animation 5. Quit "); { case '1':InsertFrame (&RG) ; break; case '2':DeleteFrame (&RG) ; break; case '3':EditFrame (&RG) ;break; case '4':ReportAnimation (&RG) ; break; case '5':RUNNING = FALSE;CleanUp (&RG) ; break; default:printf ("Please enter a valid option "); } return 0; Example Output: Please enter the Animation name: Animation_1 MENU 1. Insert a Frame at the front 2. Delete last Prame 3. Edie a Frame 4. Report the Animation 5. Quit Insert a Prame in the Animation Please enter the Frame frameName: Frame_1 MENU CST 8219 - F19 - Assignment #0 1 Insert a Frame at the front 2. Delete last Frame 3. Edit a Frame 4. Report the Animation 5. Quit Insert a Frame in the Animation Plesse enter the Frame framelame: Frame_2 MENU 1. Inserta Frame at the front 2. Delete last Frame 3. Edit a Frame 4. Report the Animation 5. Quit Animation name is Animation_1 Report the Animation Image H0, file name Frame_2 Image #1, file name Frame_1 MENU 1 Insert a Frame at the front 2. Delete last Frame 3. Edit a Frame 4. Report the Animation 5. Quit Edita Frame in the Animation There are 2 Prame(s) in the list. Piense specity the index ( 4) to edit at :0 The name of this Prame is Frame_2. Whet do you wish to replace it with? Frame_ MENU 1. Inserta Frame at the front 2. Delete last Prame 3. Edit a Frame 4. Report the Animation 5. Quit Animation name is Animation_1 Repart the Animation Image H0, file name Frame_3 Image #1, file name Frame_1 MENU 1. Inserta Frame at the front 2. Delete last Frame 3. Edit a Frame 4. Report the Animation 5. Quit //_CrtsetDbgFlag(_CRTDBG_ALLOC_MEM_DF|_CRTDBG_LEAK_CHECK_DF); // in main, after local declarations //NB must be in debug build #include finclude #include typedef enum{FALSE = 0, TRUE} BOOL; struct Frame{ char* frameName; struct Frame* pNext; } ; typedef struct{ char* animationName; struct Frame* frames; }Animation; // Forward declarations void InitAnimation (Animation*); void InsertFrame (Animation*); void DeleteFrame (Animation*); void EditFrame (Animation*) ; void ReportAnimation (Animation*); void CleanUp (Animation*); int main (void) char response; BOOL RUNNING = TRUE; Animation RG; _CrtsetDbgFlag (_CRTDBG_ALLOC_MEM_DF || InitAnimation (&RG) ; CRTDBG_LEAK_CHECK_DF); while (RUNNING) printf( "MENU 1. scanf ("&c", &response); switch (response) Insert a Frame at the front 2. Delete last Frame 3. Edit a Frame 4. Report the Animation 5. Quit "); { case '1':InsertFrame (&RG) ; break; case '2':DeleteFrame (&RG) ; break; case '3':EditFrame (&RG) ;break; case '4':ReportAnimation (&RG) ; break; case '5':RUNNING = FALSE;CleanUp (&RG) ; break; default:printf ("Please enter a valid option "); } return 0

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Database Relational Model A Retrospective Review And Analysis

Authors: C. J. Date

1st Edition

0201612941, 978-0201612943

More Books

Students also viewed these Databases questions