Question: Part 1 Write a header file called boxer.h which includes: a ) a boxer struct with name and boxerID variables b ) a function prototype
Part 1 Write a header file called boxer.h which includes: a ) a boxer struct with name and boxerID variables b ) a function prototype to add boxers to a data structure c ) a function prototype to delete a boxer from the data structure e ) a function prototype to print a weight class of boxers from the data structure f ) a function prototype to print all boxers in the data structure g ) a function prototype to determine if a boxer is in the data structure
Part 2 Write an implementation file called boxer.cpp with the functions definitions for all functions created in boxer.h
Part 3
Write a client file called client.cpp which does the following a ) Ask the user for the information for boxers until they tell you to stop b ) Add the boxers information to the data structure c ) Ask the user to provide the boxerID for a boxer for a fight d ) Determine if the boxers information is in the data structure i ) if the boxers information is in the data structure then print all of their information and the information of the other boxers in their weight class ii ) if not then tell the user that there is no boxer with that boxerID and then ask for a boxerID until they do e ) Ask the user to provide the boxerID for a potential opponent (one of the other boxers in their weight class) i ) if there is no boxer with that boxerID then ask for a boxerID until they do f ) Delete the information of both boxers from the data structure g ) Print all the boxers remaining in the data structure
Example:
Enter boxer name Fury Enter boxerID 83 Would you like to keep going(yes/no) yes Enter boxer name Haney Enter a number 84 Would you like to keep going(yes/no) yes Enter boxer name Joshua Enter a number 50 Would you like to keep going(yes/no) yes Enter customer name Adames Enter a number 49 Would you like to keep going(yes/no) yes Enter customer name Cruz Enter a number 69 Would you like to keep going(yes/no) yes Enter customer name Wilder Enter a number 68 Would you like to keep going(yes/no) yes Enter customer name Murata Enter a number 91 Would you like to keep going(yes/no) no Please enter the boxer ID for a boxer 81 There is no boxer with that boxerID Please enter the boxer ID for a boxer 83 Index: 2 Fury 83
Joshua 50
Wilder 68 Please enter the boxer ID for an opponent 65 There is no boxer with that boxerID Please enter the boxer ID for an opponent 68 Index: 0 Haney 84
Cruz 69
Index: 1 Adames 49
Murata 91
Index: 2 Joshua
50
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
