Question: main (12).cpp arena (5).h + x arena (4).cpp Miscellaneous Files 1 #ifndef _ARENA_H_ #define ARENA_H_ (GI #include #include #include #include using namespace std; const int





![void getCards (card[]); string remove_tag (string, string[], int, int); void printCards (card[]);](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f90c428c9a9_63466f90c42327d8.jpg)






main (12).cpp arena (5).h + x arena (4).cpp Miscellaneous Files 1 #ifndef _ARENA_H_ #define ARENA_H_ (GI #include #include #include #include using namespace std; const int SIZE_DECK = 12; struct card string name; int atack; int defence; // ADD BUBLE SORT ALGORITHM PROTOTYPE HERE 1// ADD INSERTION SORT ALGORITHM PROTOTYPE HERE // ADD BINARY SEARCH ALGORITHM PROTOTYPE HERE void printHeader(); void getCards (card[]); string remove_tag (string, string[], int, int); void printCards (card[]); #endif x main (12).cpp arena (5).h arena (4).cpp + Miscellaneous Files (Global Scope) #include "arena.h" HNM i // ADD BUBLE SORT ALGORITHM HERE // ADD INSERTION SORT ALGORITHM HERE // ADD BINARY SEARCH ALGORITHM HERE co void printHeader() { cout ", "","", "", "", "", "", "", }; string tag_end_name = ""; int index = 0; while(inData) x main (12).cpp rena (5).h arena (4).cpp + Miscellaneous Files 41 while(inData) (Global Scope) getline(inData, temp_string); // FIND THE CARD int start_card = temp_string.find(tags[@]); if(start_card>-1) 0 // FIND THE NAME int start_of_tag = temp_string.find(tags [2]); while(start_of_tag == -1) -0 getline(inData, temp_string); start_of_tag = temp_string.find(tags[2]); // cout > THE CARDS: "; printCards (deck); - - - - - - - // ADD YOUR CODE HERE - - - - return 0; The language is C++, for this assignment we are asked to add 2 bubble sorting algorithms for ATK and def, and 2 insertion sort algorithms for ATK and def And in the main function we need to prompt the user to select a sorting algorithm and to sort by ATK or def The program consists of 2 cpp files, one .h file and one txt file, which are provided below Add the code where the comments tell you, the sorting algorithms are on the arena.cpp and the rest are on main YU-GI-OH! For this assignment, you will be provided one text file named monsters.txt containing the description of monsters in the following format: Blue-Eyes White Dragon 3000 2500 The monsters will be read into an array as a struct. Your task is to sort and search accordingly with a given feature (attack or defence). Write a program that, after a list of structures is read into an array from the file monsters.txt, does the following operations: 1. Prompts the user with which sorting algorithm (bubble sort algorithm or insertion sort algorithm) the array should be sorted a. bubble sort algorithm defined in bubble_sort_pseudocode.txt b. insertion sort algorithm defined in the CS115 Lab Webpage 2. Prompts the user for which feature (attack or defence) the array should be sorted 3. Sort the array and display it 4. Prompts the user for a value of the considered feature and return the position of a monster in the array a. If more than one monster has that value, you only have to show the position of only one of them b. You should use here the binary search procedure defined in the CS115 Lab Webpage YU-GI-0000000000000H! >> THE CARDS: TL Blue-Eyes White Dragon ATK/3000 DEF/2500 Dark Magician ATK/2500 DEF/2100 L Exodia The Forbidden One ATK/5000 DEF/5000 Celtic Guardian ATK/1400 DEF/1200 # 5 Copycat ATK/O DEF/O Time Wizard ATK/500 DEF/400 met tonaDDDDDDDDD DDDDDDDDDDDDDDD2Et tamDDDDDDD Blue-Eyes White Dragon ATK/3000 DEF/2500 II L Baby Dragon A TK/1200 DEF/700 # 9 Kuriboh ATK/300 DEF/200 ========== ==== #12 #10 Summoned Skull ATK/2500 DEF/1200 #11 11 Blue-Eyes White Dragon L A TK/3000 DEF/2500 Red-Eyes B. Dragon ATK/2400 DEE/200 L >> CHOOSE THE SORTING ALGORITHM: 1 - BUBBLE SORT ALGORITHM 2 - INSERTION SORT ALGORITHM ki >> SORT BY: 1 - ATK 2 - DEF ki >>> BUBBLE SORT ALGORITHM SORTED BY ATK: #1 Copycat ATK/O DEF/O # 2 Kuriboh A TK/300 DEF/200 # 3 Time Wizard ATK/500 DEF/400 L Baby Dragon ATK/1200 DEF/700 # 5 Celtic Guardian ATK/1400 DEF/1200 TL Red-Eyes B. Dragon A TK/2400 DEE/200 L TI # 8 Dark Magician ATK/2500 DEF/2100 Summoned Skull ATK/2500 DEF /1200 1 L Blue-Eyes White Dragon A TK/3000 DEF/2500 D #10 Blue-Eyes White Dragon ATK/3000 DEF/2500 #11 Blue-Eyes White Dragon ATK/3000 DEF/2500 | #12 Exodia The Forbidden One ATK/5000 DEF/5000 TL Blue-Eyes White Dragon ATK/3000 DEF/2500 Blue-Eyes White Dragon ATK/3000 DEF/2500 | Exodia The Forbidden One A TK/5000 DEF/5000 TL L >> ENTER THE ATK TO SEARCH: > ATK 2500 IS FOUND AT POSITION(S) >> #7 #8 ************** DO YOU WANT TO CONTINUE [Y/N] ***** ******* > ENTER THE ATK TO SEARCH: > NUMBER 55 DOES NOT EXIST AS ATK IN THE DECK *********** DO YOU WANT TO CONTINUE [Y/N) ***** Blue-Eyes White Dragon 3000 2500 Baby Dragon 1200 700 Kuriboh 300200 Summoned Skull 2500 1200 Blue-Eyes White Dragon 3000 2500 Red-Eyes B. Dragon 2400 200