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 2500The 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). BASE 80% marks 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 shov of only one of them b. You should use here the binary search procedure defined in the Webpage TIER 1 90% marks BASE+ Apply the Program Organization Principles: Separation of Interface And Implementation TIER 2 100% marks BASE TIER 1 + 1. Keep searching (MUST USE binary search procedure) for the given feature while the user wants to continue 2. If more than one monster has the given feature, display all of them TIER 2 SAMPLE OUTPUT YU-GI-O00000000OOOO! > THE CARDS Blue-Eyes White Dragon ATK/3000 DEX/2500 Dark Magician ATX/2500 DEF/2100 Exodia The Forbidden One A TK/5000 DEF/5000 TL D Calcie Guardian ATK/1400 DEY/1200 5 Copycat ATK/O DEF/O Time Heard ATK/500 DEF/400 Blue-Eyes White Dragon ATE/3000 DEF /2500 Baby Dragon AIK/1200 DEF/700 Kuboh ATK/300 DEP/200 012 10 Summoned Skull ATK/2500 DEF /1200 II Blue-Eyes White Dragon D A TK/3000 DET/2500 Red-Eyes Dragon ATK/2400 DE/200 >> CHOOSE THE SORTING ALGORITH: 1 - BUBBLE SORT ALGORITHM 2 - INSERTION SORT ALGORITEM > SORT BY: 1 - ATK 2 - DET K1 b> BUBBLE SORT ALGORITHM SORTED BY ATK: Blue-Eyes White Dragon ATK/3000 DEE/2500 Dark Magician ATK/2500 DET/2100 Exodis The Torbidden One ATK/5000 DET/5000 Celtic Guardian ATK/1400 DEF /1200 5 Copycat AIK/O DEF/0 Time Wizard ATK/500 DET/400 Blue-Eyes White Dragon ATK/3000 DEX/2500 TL Baby Dragon ATK/1200 DEF/700 TL Keibol ATK/300 DEX/200 012 10 Summoned Skull ATK/2500 DEF/1200 411 II Blue-Eyes White Dragon D A TK/3000 DEF/2500 Red-Eyes 3 Dragon ATK/2400 DET/200 L > CHOOSE THE SORTING ALGORITHM: 1 - BUBBLE SORT ALGORITE 2 - INSERTION SORT ALGORITE > SORT BY : 1 - ATK 2 - DEF ki > BUBBLE SORT ALGORITHM SORTED BY ATK: Copycat ATK/O DEF/0 IL A Turiboh TK/300 DEF/200 Time Wizard ATK/500 DEF/400 Baby Dragon ATK/1200 DEV/700 Celtic Guardian ATX/1400 DET/1200 Red-Eyes . Dragon ATK/2400 DET/200 Summoned Skull ATK/2500 DEX/1200 D Dark Magician ATK/2500 DEF/2100 TL Blue-Eyes White Dragon L ATK/3000 DET/2500 012 Blue-Eyes White Dragon ATK/3000 DEF/2500 111 Blue-Eyes White Dragon ATK/3000 DET/2500 Exodia The Forbidden One A TK/5000 DEE/5000 TL D >> ENTER THE ASK TO SEARCH: ATK 2500 IS FOUND AT POSITION(S) > 47 48 DO YOU WANT TO CONTINUE (Y/N) ***** KKY b> ENTER THE ATX TO SEARCH: 55 > NUMBER 55 DOES NOT EXIST AS ATK IN THE DECK ******** DO YOU WANT TO CONTINUE (Y/N) ***** THE CARDS Blue-Eyes White Dragon ATK/3000 DEX/2500 Dark Magician ATX/2500 DEF/2100 Exodia The Forbidden One A TK/5000 DEF/5000 TL D Calcie Guardian ATK/1400 DEY/1200 5 Copycat ATK/O DEF/O Time Heard ATK/500 DEF/400 Blue-Eyes White Dragon ATE/3000 DEF /2500 Baby Dragon AIK/1200 DEF/700 Kuboh ATK/300 DEP/200 012 10 Summoned Skull ATK/2500 DEF /1200 II Blue-Eyes White Dragon D A TK/3000 DET/2500 Red-Eyes Dragon ATK/2400 DE/200 >> CHOOSE THE SORTING ALGORITH: 1 - BUBBLE SORT ALGORITHM 2 - INSERTION SORT ALGORITEM > SORT BY: 1 - ATK 2 - DET K1 b> BUBBLE SORT ALGORITHM SORTED BY ATK: 10:53 Assignment2.pdf TIER 1 90% marks BASE Act rice TIER 2 100% marks 2 ore than o ther of them TIER Z SAMPLE OUTPUT 10:51 Assignment 2.pdf BASE 80% marks r om the We a great of c w does the longer y one of them You should use wenge they are define 05115 TIER 1 90% marks Rowly the prog? Organisation estes 0 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 2500The 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). BASE 80% marks 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 shov of only one of them b. You should use here the binary search procedure defined in the Webpage 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 2500The 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). BASE 80% marks 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 shov of only one of them b. You should use here the binary search procedure defined in the Webpage TIER 1 90% marks BASE+ Apply the Program Organization Principles: Separation of Interface And Implementation TIER 2 100% marks BASE TIER 1 + 1. Keep searching (MUST USE binary search procedure) for the given feature while the user wants to continue 2. If more than one monster has the given feature, display all of them TIER 2 SAMPLE OUTPUT YU-GI-O00000000OOOO! > THE CARDS Blue-Eyes White Dragon ATK/3000 DEX/2500 Dark Magician ATX/2500 DEF/2100 Exodia The Forbidden One A TK/5000 DEF/5000 TL D Calcie Guardian ATK/1400 DEY/1200 5 Copycat ATK/O DEF/O Time Heard ATK/500 DEF/400 Blue-Eyes White Dragon ATE/3000 DEF /2500 Baby Dragon AIK/1200 DEF/700 Kuboh ATK/300 DEP/200 012 10 Summoned Skull ATK/2500 DEF /1200 II Blue-Eyes White Dragon D A TK/3000 DET/2500 Red-Eyes Dragon ATK/2400 DE/200 >> CHOOSE THE SORTING ALGORITH: 1 - BUBBLE SORT ALGORITHM 2 - INSERTION SORT ALGORITEM > SORT BY: 1 - ATK 2 - DET K1 b> BUBBLE SORT ALGORITHM SORTED BY ATK: Blue-Eyes White Dragon ATK/3000 DEE/2500 Dark Magician ATK/2500 DET/2100 Exodis The Torbidden One ATK/5000 DET/5000 Celtic Guardian ATK/1400 DEF /1200 5 Copycat AIK/O DEF/0 Time Wizard ATK/500 DET/400 Blue-Eyes White Dragon ATK/3000 DEX/2500 TL Baby Dragon ATK/1200 DEF/700 TL Keibol ATK/300 DEX/200 012 10 Summoned Skull ATK/2500 DEF/1200 411 II Blue-Eyes White Dragon D A TK/3000 DEF/2500 Red-Eyes 3 Dragon ATK/2400 DET/200 L > CHOOSE THE SORTING ALGORITHM: 1 - BUBBLE SORT ALGORITE 2 - INSERTION SORT ALGORITE > SORT BY : 1 - ATK 2 - DEF ki > BUBBLE SORT ALGORITHM SORTED BY ATK: Copycat ATK/O DEF/0 IL A Turiboh TK/300 DEF/200 Time Wizard ATK/500 DEF/400 Baby Dragon ATK/1200 DEV/700 Celtic Guardian ATX/1400 DET/1200 Red-Eyes . Dragon ATK/2400 DET/200 Summoned Skull ATK/2500 DEX/1200 D Dark Magician ATK/2500 DEF/2100 TL Blue-Eyes White Dragon L ATK/3000 DET/2500 012 Blue-Eyes White Dragon ATK/3000 DEF/2500 111 Blue-Eyes White Dragon ATK/3000 DET/2500 Exodia The Forbidden One A TK/5000 DEE/5000 TL D >> ENTER THE ASK TO SEARCH: ATK 2500 IS FOUND AT POSITION(S) > 47 48 DO YOU WANT TO CONTINUE (Y/N) ***** KKY b> ENTER THE ATX TO SEARCH: 55 > NUMBER 55 DOES NOT EXIST AS ATK IN THE DECK ******** DO YOU WANT TO CONTINUE (Y/N) ***** THE CARDS Blue-Eyes White Dragon ATK/3000 DEX/2500 Dark Magician ATX/2500 DEF/2100 Exodia The Forbidden One A TK/5000 DEF/5000 TL D Calcie Guardian ATK/1400 DEY/1200 5 Copycat ATK/O DEF/O Time Heard ATK/500 DEF/400 Blue-Eyes White Dragon ATE/3000 DEF /2500 Baby Dragon AIK/1200 DEF/700 Kuboh ATK/300 DEP/200 012 10 Summoned Skull ATK/2500 DEF /1200 II Blue-Eyes White Dragon D A TK/3000 DET/2500 Red-Eyes Dragon ATK/2400 DE/200 >> CHOOSE THE SORTING ALGORITH: 1 - BUBBLE SORT ALGORITHM 2 - INSERTION SORT ALGORITEM > SORT BY: 1 - ATK 2 - DET K1 b> BUBBLE SORT ALGORITHM SORTED BY ATK: 10:53 Assignment2.pdf TIER 1 90% marks BASE Act rice TIER 2 100% marks 2 ore than o ther of them TIER Z SAMPLE OUTPUT 10:51 Assignment 2.pdf BASE 80% marks r om the We a great of c w does the longer y one of them You should use wenge they are define 05115 TIER 1 90% marks Rowly the prog? Organisation estes 0 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 2500The 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). BASE 80% marks 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 shov of only one of them b. You should use here the binary search procedure defined in the Webpage