Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Purpose: This is assignment #0 converted to C++, but now using classes. You are to write the code in Visual Studio 2019 for a simple
Purpose: This is assignment #0 converted to C++, but now using classes. You are to write the code in Visual Studio 2019 for a simple C++ language console application that holds the data of an animation application (there is no actual animation graphics in the assignment) using a linked list in dynamic memory. The start of the code is shown on the next page; it is also on Brightspace in a text file that you can copy and paste. Because I will use this code to mark the assignment you must not modify it (not a single character changed): no code added or removed, no new global variables, no new functions, no macros, no defines and no statics; leave the file contents exactly as you are given them. Your task is to implement, in Frame.cpp and Animation.cpp using C++, only the member functions of the Frame and Animation classes (as defined in the header files Frame.h and Animation.h. You submit only Frame.cpp and Animation.cpp. The Animation is a series of Frame objects held in a single linked list (forward list) in dynamic (heap) memory. This memory model will be adapted to a C++ template in a later assignment. When the application is running you can: add a new Frame to start of the Animation Frame list delete the last Frame in the list edit a selected Frame to change the frame name report the Animation to show the list of Frame details quit. // Frame.h #pragma once //Animation.h #pragma once class Animation char* animationName; Frame* frames; class Frame { char* frameName; Frame* pNext; public: Frame(); Frame(); char* & Get FrameName() { return frameName; } Frame*& GetpNext() { return pNext; } public: Animation(); Animation(); void Insert Frame(); void Edit Frame(); void Delete Frame(); void ReportAnimation(); //a331.cpp #define _CRT_SECURE NO WARNINGS #define CRTDBG MAP_ALLOC // need this to get the line identification 1/_CrtsetDbgFlag (_CRTDBG_ALLOC_MEM_DF|_CRTDBG_LEAK_CHECK_DF); // in main, after local declarations //NB must be in debug build #include #include using namespace std; #include "Frame.h" #include "Animation.h" int main(void) char response; bool RUNNING = true; Animation A; _CrtsetDbgFlag (_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF); while (RUNNING) cout>response; switch (response) -- 0 0 '1':A.Insert Frame(); break; e '2':A. DeleteFrame(); break; e '3':A. Edit Frame(); break; e '4':A. ReportAnimation(); break; e '5': RUNNING = false; break; default:cout #include using namespace std; #include "Frame.h" #include "Animation.h" int main(void) char response; bool RUNNING = true; Animation A; _CrtsetDbgFlag (_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF); while (RUNNING) cout>response; switch (response) -- 0 0 '1':A.Insert Frame(); break; e '2':A. DeleteFrame(); break; e '3':A. Edit Frame(); break; e '4':A. ReportAnimation(); break; e '5': RUNNING = false; break; default:cout
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started