Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

They need to be in their certain folders (.h and .cpp) for each CLASS please!! in C++ You are writing a program to keep track

They need to be in their certain folders (.h and .cpp) for each CLASS please!!

in C++

You are writing a program to keep track of your library of video games. Your program should allow users to load video

game data from a file, save video games to a file, add a video game, remove a video game, display all video game in the

library, and remove all video games.

FILES YOU WILL SUBMIT IN YOUR ZIP FILE

This program contains multiple files as described below:

Text.h

header file for a Text class, which is your own version of the C++ String Class

Text.cpp

source file containing function definitions required for the Text class

VideoGame.h

header file for a VideoGame class, which has data and functions describing a single video game.

VideoGame.cpp

source file containing the function definitions required for the VideoGame class.

VideoGameLibrary.h

header file for a VideoGameLibrary class, which has data and functions describing a video game library (multiple games)

VideoGameLibrary.cpp

source file containing the function definitions required for the VideoGameLibrary class.

Program1.cpp

this is the driver for your program which uses the VideoGameLibrary class to create a VideoGameLibrary object.

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribedimage text in transcribed

image text in transcribed

image text in transcribed

SPECIFICATIONS PROGRAM1.CPP (DRIVER) Your program should ask the user "How many video games can your library hold?" Once it reads in this number, it should dynamically allocate a Video GameLibrary object, sending this number as an argument. Then, the program should display a menu of six choices: What would you like to do? 1. Load video games from file. 2. Save video games to a file. 3. Add a video game. 4. Remove a video game. 5. Display all video games. 6. Remove ALL video games from this library and end program. CHOOSE 1-6: If the user chooses to load a video game from a file, then ask the name of the file and call the Video GameLibrary's load Video gamesFromFile function, sending the filename as a string. If the user chooses to save video games to a file, then ask the name of the file and call the Video GameLibrary's saveToFile function, sending the filename as a string. If the user chooses to add a video game, call the Video GameLibrary's addVideo Game ToArray function. If the user chooses to remove a video game, call the Video GameLibrary's remove Video Game FromArray function. If the user chooses to display all video games, call the Video GameLibrary's display Video Games function. If the user chooses to remove all video games from the library and end the program, then you should release (delete) the VideoGameLibrary object and end the program. VIDEOGAMELIBRARY CLASS ATTRIBUTES . video GamesArray-a pointer to an array of pointers. Each pointer in the array should be able to point to hold the memory address of) an individual Video game object. [Hint: you will need TWO stars to define this attribute.] maxGames - this is the maximum number of video games the library can hold and is the size of the video gamesArray numGames - this is the current number of video games actually pointed to in the video GamesArray. . FUNCTIONS Function name: resizeVideoGameArray Parameters: none Returns: none (void) Purpose: This function is called by addVideoGameToArray when the array size is not big enough to hold a new video game that needs to be added. The function makes the array twice as big as it currently is and then moves all the video game pointers to this new array. Function name: Video GameLibrary constructor Parameters: An integer containing the maximum size of the video game library Purpose: This function is automatically called when a Video GameLibrary object is created and it creates a library of video games. Specifications: The function will dynamically allocate an array of pointers to Video Game objects based on the maximum size and will also set the current number of video games to zero. . . Function name: "VideoGameLibrary destructor Purpose: This function is automatically called when the Video Game object is destroyed. This releases the dynamically created individual video games and then deletes the array. Specifications: Prints a message "VideoGameLibrary destructor: Released memory for each game in the video game array and the array itself." Function name: addVideoGameToArray Parameters: none Returns: none (void) Purpose: This function should be called when you need to add a single video game to the video game library. Specifications: It should ask the user for the video game title (read in as c-string, then dynamically create a Text object), platform (read in as c-string, then dynamically create a Text object), video game year (integer), video game genre (read in as C-string, then dynamically create a Text object), video game age rating (read in as c- string, then dynamically create a Text object), and IGDB user rating (between 0 and 100). Then it should dynamically allocate a new Video Game object, sending the video game data just acquired from the user as arguments to the VideoGame constructor. Then, this function should check to see if numGames is equal to maxGames. If it is equal, then call the resizeVideoGameArray function. Then, it should assign this new video game to the correct pointer in the videoGamesArray. Last, it should increment numGames. . Function name: displayVideoGames Parameters: none Returns: none (void) Purpose: This function should be called when the user wants to have all the video games in the library printed to the screen. Specifications: This function loops through the video gamesArray and calls each Video game's print VideoGameDetails function. . . Function name: displayVideoGame Titles Parameters: none Returns: none (void) Purpose: This function should be called when you want to print only the video game titles out of the video game library (when a user wants to remove a video game from library). Specifications: This function should loop through the video gamesArray, retrieve the Video game's title by calling the Video game's getVideo Game Title function, and then printing out the title by calling the Text's displayText function. . Function name: load Video GamesFromFile Parameters: A pointer to a character (c-string or string literal argument) containing the filename Returns: none (void) Purpose: This function should be called when the user wants to read video game data from a file and add the video games to the video game library. The file must have data in the following order: title, platform, year, genre, age rating, IGDB user rating. Specifications: This function will use a loop to read the contents of the file until reaching the end of file. For each video game, it will read the title in with a c-string and then dynamically allocate a Text to hold the title. Then it will read in the video game platforms with a c-string and then dynamically allocate a Text to hold the platform. Then it will read in the video game year. Then it will read in the video game genre with a c-string and then dynamically allocate a Text to hold the genre. Then it will read in the video game age rating with a c-string and then dynamically allocate a Text to hold the rating. Then it will read in the user rating (between 0 & 100). Then, it will dynamically create a new Video Game object, sending the video game data just acquired from the user as arguments to the Video game constructor. Then, this function should check to see if numGames is equal to maxGames. If it is equal, then call the resizeVideoGameArray function. Then, it should assign this new video game to the correct pointer in the video gamesArray. Then, it should increment numGames. Then, it should print the title of the video game and say " was added to the video game library!" This should happen for each video game read from the file. At the end of the function, it should print out how many video games were read from the file & added to the library. [Note: The temporary c-string used to load in data should be able to hold a very large string - 10000 characters] Function name: remove Video Game FromArray Parameters: none Returns: none (void) Purpose: This function should be called when the user wants to remove one single video game from the video game library. The video game to be removed must is identified by the user and then removed. Specifications: This function should first make sure that the number of video games is at least 1. if not, it should print that there must always be one video game in the library and the function should end. Then, the function should call the displayVideoGame Titles function to print all the video game titles. Then, ask the user to choose a video game to remove between 1 & numGames. Once the user identifies the video game, your program should print that the video game title has been successfully deleted. Then, release the dynamically allocated space for this video game and move all array elements in video gameArray back 1 starting with this deleted video game's element. Last, decrement numGames. . Function name: saveToFile Parameters: A pointer to a character (c-string or string literal argument) containing the filename Returns: none (void) Purpose: This function should be called when the user wants to print all the video game data from the video game library to a file. The data is printed in the following order (one piece of data per line): title, platform, year, genre, age rating, IGDB user rating. Specifications: Open the file with the filename that was sent to this function. Then, use a loop to go through the video gameArray and call the video game's print VideoGameDetailsToFile function, sending the file stream object to be printed to. Then, close the and print a irmati that all video games have been printed to the filename. VIDEOGAME CLASS ATTRIBUTES title - a pointer to a Text object, which will hold the title of the video game platform - a pointer to a Text object, which will hold the platforms that the video game is available on year- an integer representing the year the video game was released genre -a pointer to a Text object, which will hold the genre of the video game ageRating - a pointer to a Text object, which will hold the age rating of the video game user Rating - a number between 0 and 100 representing the user rating from IGDB FUNCTIONS 0 o Function name: VideoGame constructor Parameters: A pointer to a Text variable, containing the title of the video game A pointer to a Text variable, containing the platform(s) of the video game An integer containing the year the video game was released A pointer to a Text variable, containing the genre of the video game A pointer to a Text variable, containing the age rating of the video game A number containing the IGDB (user) rating of the video game (out of 100) Purpose: This function should be called when all video game information is known and it will create a new video game with this information. Specifications: initialize all attribute to the arguments sent to this function. O o Function name: Video Game destructor Purpose: This function is automatically called when a Video game object is destroyed. This function releases the dynamically allocated text arrays in the Video game. Specifications: Release the dynamically allocated space for the video gameTitle, platform, genre, and age rating. Prints a message: "Video Game destructor: Released memory for title, platform, genre, & age rating." Function name: printVideoGameDetails Parameters: none Returns: none (void) Purpose: This function should be called when the user wants to print ALL the video game information to the screen. Specifications: Print the title, year, genre, rating & number of stars. Remember that in order to print the Text objects, you must call their displayText function. . Function name: printVideoGameDetails ToFile Parameters: a file stream object (sent by reference) Returns: none (void) Purpose: This function should be called when the user wants to print ALL the video game information to the file. Specifications: Print the title, year, genre, rating & user ratinmg to the file stream object that was sent to this function. In order to print the Text objects to the file, you must first retrieve the c-string attribute (calling the getText function) from this Text, and then you can print it to the file. Function name: getVideo Game Title (accessor function) Parameters: none Returns: a pointer to the Text object containing the video game title . TEXT CLASS ATTRIBUTES textArray - a pointer to a constant character array textLength - an integer representing the number of characters stored in the textArray FUNCTIONS . Function Name: Text (constructor) Parameters: Send a pointer to a constant character array or a string literal to this function Purpose: called automatically when Text object is created, dynamically allocates a character array which contains the character array passed to the function. Specifications: dynamically allocate a new character string the size of the string passed to this function plus one (for the null terminator). Then, copy the text sent as an argument to this constructor to the new dynamically allocated c-string. Then, set the textArray attribute to this newly created c-string. Function Name: Text (destructor) Purpose: release dynamically allocated memory for the c-string in the Text object Specifications: release the memory for the c-string pointed to by textArray Prints a message: "Text destructor: Released memory for textArray." Function Name: displayText Parameters: none Returns: none (void) Purpose: print the c-string (textArray) to the screen Function Name: getText (accessor function) Parameters: none Returns: pointer to a constant character array Function Name: getLength (accessor function) Parameters: none Returns: the length of the string All user input is highlighted in yellow. How many video games can your library hold? 2 What would you like to do? 1. Load video games from file. 2. Save video games to a file. 3. Add a video game. 4. Remove a video game. 5 5. Display all video games. 6. Remove ALL video games from this Library and end program. CHOOSE 1-6: 9 That is not a valid choice. CHOOSE 1-6: 1 What is the name of the file? (example.txt): Sorry, I was unable to open the file. wrong_file.txt What would you like to do? 1. Load video games from file. Save video games to a file. Add a video game. 4. Remove a video game. Display all video games. 6. Remove ALL video games from this Library and end program. CHOOSE 1-6: What is the name of the file? (example.txt): three_games.txt The Witcher 3: Wild Hunt was added to the video game library! God of War was added to the video game library! Resizing Videogame Antax from 2 to 4. Chrono Trigger was added to the video game library! 3 video games were read from the file and added to your Videogame library. What would you like to do? 1. Load video games from file. 2. Save video games to a file. 3. Add a video game. 4. Remove a video game. 5. Display all video games. 6. Remove ALL video games from this Library and end program. CHOOSE 1-6: 3 Video Game TITLE: The Twins Video Game PLATFORM: PC Video Game YEAR: 2020 Video Game GENRE: Simulator, Visual Novel Video Game AGE RATING: M17+ Video Game USER RATING (out of 100): 71 What would you like to do? 1. Load video games from file. 2. Save video games to a file. 3. Add a video game. 4. Remove a video game. 5. Display all video games. 6. Remove ALL video games from this Library and end program. CHOOSE 1-6: 5 Game Title: Platform: Year Released: Genre: Rating: Number of Stars: --Video Game 1---- The Witcher 3: Wild Hunt Xbox One, PC, PlayStation 4 2015 Adventure, Role-playing (RPG) M17+ 96 Game Title: Platform: Year Released: Genre: Rating: Number of Stars: --Video Game 2---- God of War PlayStation 4 2018 Adventure, Role-playing (RPG) M17+ 96 ----Video Game 3---- Game Title: Chrono Trigger Platform: Nintendo DS, Wii, PlayStation, SNES, PC, ios, Android Year Released: Genre: Role-playing (RPG) Rating: Number of Stars: 94 1995 E10+ Game Title: Platform: Year Released: Genre: Rating: Number of Stars: ---Video Game 4--- The Twins PC 2020 Simulator, Visual Novel M17+ 71 What would you like to do? 1. Load video games from file. 2. Save video games to a file. 3. 3 Add a video game. 4. Remove a video game. 5 Display all video games. 6. Remove ALL video games from this Library and end program. CHOOSE 1-6: 4 Choose from the following video games to remove: Video Game 1: The Witcher 3: Wild Hunt Vio Game 2: God of War Video Game 3: Chrono Trigger Video Game 4: The Twins Choose a video game to remove between 1 & 4: 2 The video game "God of War" has been successfully deleted. Text destructor: Released memory for textar ex. Text destructor: Released memory for textArray. Text destructor: Released memory for textArray. Text destructor: Released memory for textArray. VideoGame destructor: Released memory for title, platform, genre, & rating. What would you like to do? 1. Load video games from file. 2. Save video games to a file. 3. Add a video game. 4. Remove a video game. 5. Display all video games. 6. Remove ALL video games from this Library and end program. CHOOSE 1-6: 5 Game Title: Platform: Year Released: Genre: Rating: Number of Stars: -----Video Game 1- The Witcher 3: Wild Hunt Xbox One, PC, PlayStation 4 2015 Adventure, Role-playing (RPG) M17+ 96 Game Title: Platform: Year Released: Genre: Rating: Number of Stars: -Video Game 2----- Chrono Trigger Nintendo DS, Wii, PlayStation, SNES, PC, ios, Android 1995 Role-playing (RPG) E10+ 94 Game Title: Platform: Year Released: Genre: Rating: Number of Stars: ----Video Game 3---- The Twins PC 2020 Simulator, Visual Novel M17+ 71 What would you like to do? 1. Load video games from file. 2 Save video games to a file. Add a video game. 4 Remove a video game. 5 Display all video games. 6. Remove ALL video games from this Library and end program. CHOOSE 1-6: 2 What do you want to name the file? (example.txt): 1-22-21_save.txt All video games in your library have been printed to 1-22-21_save.txt What would you like to do? 1. Load video games from file. 2. Save video games to a file. 3. Add a video game. Remove a video game. 5. Display all video games. 6. Remove ALL video games from this Library and end program. CHOOSE 1-6: 6 Text destructor: Released memory for textArray. Text destructor: Released memory for textArray. Text destructor: Released memory for textArray. Text destructor: Released memory for textArray. Video Game destructor: Released memory for title, platform, genre, & rating. Text destructor: Released memory for textArray. Text destructor: Released memory for textArray. Text destructor: Released memory for textArray. Text destructor: Released memory for textArray. Video Game destructor: Released memory for title, platform, genre, & rating. Text destructor: Released memory for textArray. Text destructor: Released memory for textArray. Text destructor: Released memory for textArray. Text destructor: Released memory for textArray. Video Game destructor: Released memory for title, platform, genre, & rating. VideoGameLibrary destructor: Released memory for each game in the video game array and the array itself. GOODBYE! SPECIFICATIONS PROGRAM1.CPP (DRIVER) Your program should ask the user "How many video games can your library hold?" Once it reads in this number, it should dynamically allocate a Video GameLibrary object, sending this number as an argument. Then, the program should display a menu of six choices: What would you like to do? 1. Load video games from file. 2. Save video games to a file. 3. Add a video game. 4. Remove a video game. 5. Display all video games. 6. Remove ALL video games from this library and end program. CHOOSE 1-6: If the user chooses to load a video game from a file, then ask the name of the file and call the Video GameLibrary's load Video gamesFromFile function, sending the filename as a string. If the user chooses to save video games to a file, then ask the name of the file and call the Video GameLibrary's saveToFile function, sending the filename as a string. If the user chooses to add a video game, call the Video GameLibrary's addVideo Game ToArray function. If the user chooses to remove a video game, call the Video GameLibrary's remove Video Game FromArray function. If the user chooses to display all video games, call the Video GameLibrary's display Video Games function. If the user chooses to remove all video games from the library and end the program, then you should release (delete) the VideoGameLibrary object and end the program. VIDEOGAMELIBRARY CLASS ATTRIBUTES . video GamesArray-a pointer to an array of pointers. Each pointer in the array should be able to point to hold the memory address of) an individual Video game object. [Hint: you will need TWO stars to define this attribute.] maxGames - this is the maximum number of video games the library can hold and is the size of the video gamesArray numGames - this is the current number of video games actually pointed to in the video GamesArray. . FUNCTIONS Function name: resizeVideoGameArray Parameters: none Returns: none (void) Purpose: This function is called by addVideoGameToArray when the array size is not big enough to hold a new video game that needs to be added. The function makes the array twice as big as it currently is and then moves all the video game pointers to this new array. Function name: Video GameLibrary constructor Parameters: An integer containing the maximum size of the video game library Purpose: This function is automatically called when a Video GameLibrary object is created and it creates a library of video games. Specifications: The function will dynamically allocate an array of pointers to Video Game objects based on the maximum size and will also set the current number of video games to zero. . . Function name: "VideoGameLibrary destructor Purpose: This function is automatically called when the Video Game object is destroyed. This releases the dynamically created individual video games and then deletes the array. Specifications: Prints a message "VideoGameLibrary destructor: Released memory for each game in the video game array and the array itself." Function name: addVideoGameToArray Parameters: none Returns: none (void) Purpose: This function should be called when you need to add a single video game to the video game library. Specifications: It should ask the user for the video game title (read in as c-string, then dynamically create a Text object), platform (read in as c-string, then dynamically create a Text object), video game year (integer), video game genre (read in as C-string, then dynamically create a Text object), video game age rating (read in as c- string, then dynamically create a Text object), and IGDB user rating (between 0 and 100). Then it should dynamically allocate a new Video Game object, sending the video game data just acquired from the user as arguments to the VideoGame constructor. Then, this function should check to see if numGames is equal to maxGames. If it is equal, then call the resizeVideoGameArray function. Then, it should assign this new video game to the correct pointer in the videoGamesArray. Last, it should increment numGames. . Function name: displayVideoGames Parameters: none Returns: none (void) Purpose: This function should be called when the user wants to have all the video games in the library printed to the screen. Specifications: This function loops through the video gamesArray and calls each Video game's print VideoGameDetails function. . . Function name: displayVideoGame Titles Parameters: none Returns: none (void) Purpose: This function should be called when you want to print only the video game titles out of the video game library (when a user wants to remove a video game from library). Specifications: This function should loop through the video gamesArray, retrieve the Video game's title by calling the Video game's getVideo Game Title function, and then printing out the title by calling the Text's displayText function. . Function name: load Video GamesFromFile Parameters: A pointer to a character (c-string or string literal argument) containing the filename Returns: none (void) Purpose: This function should be called when the user wants to read video game data from a file and add the video games to the video game library. The file must have data in the following order: title, platform, year, genre, age rating, IGDB user rating. Specifications: This function will use a loop to read the contents of the file until reaching the end of file. For each video game, it will read the title in with a c-string and then dynamically allocate a Text to hold the title. Then it will read in the video game platforms with a c-string and then dynamically allocate a Text to hold the platform. Then it will read in the video game year. Then it will read in the video game genre with a c-string and then dynamically allocate a Text to hold the genre. Then it will read in the video game age rating with a c-string and then dynamically allocate a Text to hold the rating. Then it will read in the user rating (between 0 & 100). Then, it will dynamically create a new Video Game object, sending the video game data just acquired from the user as arguments to the Video game constructor. Then, this function should check to see if numGames is equal to maxGames. If it is equal, then call the resizeVideoGameArray function. Then, it should assign this new video game to the correct pointer in the video gamesArray. Then, it should increment numGames. Then, it should print the title of the video game and say " was added to the video game library!" This should happen for each video game read from the file. At the end of the function, it should print out how many video games were read from the file & added to the library. [Note: The temporary c-string used to load in data should be able to hold a very large string - 10000 characters] Function name: remove Video Game FromArray Parameters: none Returns: none (void) Purpose: This function should be called when the user wants to remove one single video game from the video game library. The video game to be removed must is identified by the user and then removed. Specifications: This function should first make sure that the number of video games is at least 1. if not, it should print that there must always be one video game in the library and the function should end. Then, the function should call the displayVideoGame Titles function to print all the video game titles. Then, ask the user to choose a video game to remove between 1 & numGames. Once the user identifies the video game, your program should print that the video game title has been successfully deleted. Then, release the dynamically allocated space for this video game and move all array elements in video gameArray back 1 starting with this deleted video game's element. Last, decrement numGames. . Function name: saveToFile Parameters: A pointer to a character (c-string or string literal argument) containing the filename Returns: none (void) Purpose: This function should be called when the user wants to print all the video game data from the video game library to a file. The data is printed in the following order (one piece of data per line): title, platform, year, genre, age rating, IGDB user rating. Specifications: Open the file with the filename that was sent to this function. Then, use a loop to go through the video gameArray and call the video game's print VideoGameDetailsToFile function, sending the file stream object to be printed to. Then, close the and print a irmati that all video games have been printed to the filename. VIDEOGAME CLASS ATTRIBUTES title - a pointer to a Text object, which will hold the title of the video game platform - a pointer to a Text object, which will hold the platforms that the video game is available on year- an integer representing the year the video game was released genre -a pointer to a Text object, which will hold the genre of the video game ageRating - a pointer to a Text object, which will hold the age rating of the video game user Rating - a number between 0 and 100 representing the user rating from IGDB FUNCTIONS 0 o Function name: VideoGame constructor Parameters: A pointer to a Text variable, containing the title of the video game A pointer to a Text variable, containing the platform(s) of the video game An integer containing the year the video game was released A pointer to a Text variable, containing the genre of the video game A pointer to a Text variable, containing the age rating of the video game A number containing the IGDB (user) rating of the video game (out of 100) Purpose: This function should be called when all video game information is known and it will create a new video game with this information. Specifications: initialize all attribute to the arguments sent to this function. O o Function name: Video Game destructor Purpose: This function is automatically called when a Video game object is destroyed. This function releases the dynamically allocated text arrays in the Video game. Specifications: Release the dynamically allocated space for the video gameTitle, platform, genre, and age rating. Prints a message: "Video Game destructor: Released memory for title, platform, genre, & age rating." Function name: printVideoGameDetails Parameters: none Returns: none (void) Purpose: This function should be called when the user wants to print ALL the video game information to the screen. Specifications: Print the title, year, genre, rating & number of stars. Remember that in order to print the Text objects, you must call their displayText function. . Function name: printVideoGameDetails ToFile Parameters: a file stream object (sent by reference) Returns: none (void) Purpose: This function should be called when the user wants to print ALL the video game information to the file. Specifications: Print the title, year, genre, rating & user ratinmg to the file stream object that was sent to this function. In order to print the Text objects to the file, you must first retrieve the c-string attribute (calling the getText function) from this Text, and then you can print it to the file. Function name: getVideo Game Title (accessor function) Parameters: none Returns: a pointer to the Text object containing the video game title . TEXT CLASS ATTRIBUTES textArray - a pointer to a constant character array textLength - an integer representing the number of characters stored in the textArray FUNCTIONS . Function Name: Text (constructor) Parameters: Send a pointer to a constant character array or a string literal to this function Purpose: called automatically when Text object is created, dynamically allocates a character array which contains the character array passed to the function. Specifications: dynamically allocate a new character string the size of the string passed to this function plus one (for the null terminator). Then, copy the text sent as an argument to this constructor to the new dynamically allocated c-string. Then, set the textArray attribute to this newly created c-string. Function Name: Text (destructor) Purpose: release dynamically allocated memory for the c-string in the Text object Specifications: release the memory for the c-string pointed to by textArray Prints a message: "Text destructor: Released memory for textArray." Function Name: displayText Parameters: none Returns: none (void) Purpose: print the c-string (textArray) to the screen Function Name: getText (accessor function) Parameters: none Returns: pointer to a constant character array Function Name: getLength (accessor function) Parameters: none Returns: the length of the string All user input is highlighted in yellow. How many video games can your library hold? 2 What would you like to do? 1. Load video games from file. 2. Save video games to a file. 3. Add a video game. 4. Remove a video game. 5 5. Display all video games. 6. Remove ALL video games from this Library and end program. CHOOSE 1-6: 9 That is not a valid choice. CHOOSE 1-6: 1 What is the name of the file? (example.txt): Sorry, I was unable to open the file. wrong_file.txt What would you like to do? 1. Load video games from file. Save video games to a file. Add a video game. 4. Remove a video game. Display all video games. 6. Remove ALL video games from this Library and end program. CHOOSE 1-6: What is the name of the file? (example.txt): three_games.txt The Witcher 3: Wild Hunt was added to the video game library! God of War was added to the video game library! Resizing Videogame Antax from 2 to 4. Chrono Trigger was added to the video game library! 3 video games were read from the file and added to your Videogame library. What would you like to do? 1. Load video games from file. 2. Save video games to a file. 3. Add a video game. 4. Remove a video game. 5. Display all video games. 6. Remove ALL video games from this Library and end program. CHOOSE 1-6: 3 Video Game TITLE: The Twins Video Game PLATFORM: PC Video Game YEAR: 2020 Video Game GENRE: Simulator, Visual Novel Video Game AGE RATING: M17+ Video Game USER RATING (out of 100): 71 What would you like to do? 1. Load video games from file. 2. Save video games to a file. 3. Add a video game. 4. Remove a video game. 5. Display all video games. 6. Remove ALL video games from this Library and end program. CHOOSE 1-6: 5 Game Title: Platform: Year Released: Genre: Rating: Number of Stars: --Video Game 1---- The Witcher 3: Wild Hunt Xbox One, PC, PlayStation 4 2015 Adventure, Role-playing (RPG) M17+ 96 Game Title: Platform: Year Released: Genre: Rating: Number of Stars: --Video Game 2---- God of War PlayStation 4 2018 Adventure, Role-playing (RPG) M17+ 96 ----Video Game 3---- Game Title: Chrono Trigger Platform: Nintendo DS, Wii, PlayStation, SNES, PC, ios, Android Year Released: Genre: Role-playing (RPG) Rating: Number of Stars: 94 1995 E10+ Game Title: Platform: Year Released: Genre: Rating: Number of Stars: ---Video Game 4--- The Twins PC 2020 Simulator, Visual Novel M17+ 71 What would you like to do? 1. Load video games from file. 2. Save video games to a file. 3. 3 Add a video game. 4. Remove a video game. 5 Display all video games. 6. Remove ALL video games from this Library and end program. CHOOSE 1-6: 4 Choose from the following video games to remove: Video Game 1: The Witcher 3: Wild Hunt Vio Game 2: God of War Video Game 3: Chrono Trigger Video Game 4: The Twins Choose a video game to remove between 1 & 4: 2 The video game "God of War" has been successfully deleted. Text destructor: Released memory for textar ex. Text destructor: Released memory for textArray. Text destructor: Released memory for textArray. Text destructor: Released memory for textArray. VideoGame destructor: Released memory for title, platform, genre, & rating. What would you like to do? 1. Load video games from file. 2. Save video games to a file. 3. Add a video game. 4. Remove a video game. 5. Display all video games. 6. Remove ALL video games from this Library and end program. CHOOSE 1-6: 5 Game Title: Platform: Year Released: Genre: Rating: Number of Stars: -----Video Game 1- The Witcher 3: Wild Hunt Xbox One, PC, PlayStation 4 2015 Adventure, Role-playing (RPG) M17+ 96 Game Title: Platform: Year Released: Genre: Rating: Number of Stars: -Video Game 2----- Chrono Trigger Nintendo DS, Wii, PlayStation, SNES, PC, ios, Android 1995 Role-playing (RPG) E10+ 94 Game Title: Platform: Year Released: Genre: Rating: Number of Stars: ----Video Game 3---- The Twins PC 2020 Simulator, Visual Novel M17+ 71 What would you like to do? 1. Load video games from file. 2 Save video games to a file. Add a video game. 4 Remove a video game. 5 Display all video games. 6. Remove ALL video games from this Library and end program. CHOOSE 1-6: 2 What do you want to name the file? (example.txt): 1-22-21_save.txt All video games in your library have been printed to 1-22-21_save.txt What would you like to do? 1. Load video games from file. 2. Save video games to a file. 3. Add a video game. Remove a video game. 5. Display all video games. 6. Remove ALL video games from this Library and end program. CHOOSE 1-6: 6 Text destructor: Released memory for textArray. Text destructor: Released memory for textArray. Text destructor: Released memory for textArray. Text destructor: Released memory for textArray. Video Game destructor: Released memory for title, platform, genre, & rating. Text destructor: Released memory for textArray. Text destructor: Released memory for textArray. Text destructor: Released memory for textArray. Text destructor: Released memory for textArray. Video Game destructor: Released memory for title, platform, genre, & rating. Text destructor: Released memory for textArray. Text destructor: Released memory for textArray. Text destructor: Released memory for textArray. Text destructor: Released memory for textArray. Video Game destructor: Released memory for title, platform, genre, & rating. VideoGameLibrary destructor: Released memory for each game in the video game array and the array itself. GOODBYE

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

Professional Microsoft SQL Server 2012 Administration

Authors: Adam Jorgensen, Steven Wort

1st Edition

1118106881, 9781118106884

More Books

Students also viewed these Databases questions

Question

=+2 Discover who are the right customers to involve in the process.

Answered: 1 week ago