Question: need help where it says / / your code here Structures and Enumeration A . You are to write a program to do the followings:
need help where it says your code here
Structures and Enumeration
A You are to write a program to do the followings:
Define an enumeration type RefereeGrade including values UNKNOWN, CLUB, STATE, NATIONAL and FIFA given by instructor
Define a structure named SReferee containing data members for the following information:
Id typed string
quad First Name typed string
Last Name typed string
Grade typed RefereeGrade
Then, create an array of elements typed SReferee and initialize this array given by instructor
Create a menu with the following options:
a List all referees
b List all referees of a specific grade
c List all referees with grade lower than a specific grade
d List all referees with grade higher than a specific grade
e List information of a specific referee using the Id
f List information of a specific referee using the first and last names
g Add a referee
h Remove a referee using first and last names
i Update referee grade using Id
j Quit
For all the listing options, the header needs to be displayed.
For options "List all referees", only list the referees with the id NOT given by instructor
For option "List all referees with grade ask for that specific grade and then use operators or for comparison.
For option "Add a referee", find index of an available slot ie ID is If there is no slot available, raise an error message and return to the menu. If there is at least one, ask new referee information id names, grade and then insert the information into that slot.
For option "Remove a referee", ask for referee first and last names and make sure it is not "None". Then, find the index of that referee in the list. If found, reset the information with the default value: "None", "None", UnKNOWN for id first name, last name and grade respectively. Otherwise, raise an error message
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
