Question: Help me solve please You are to write the definition for a class named CGame. Followings are details for data members and member functions for

Help me solve please
You are to write the definition for a class named CGame. Followings are details for data
members and member functions for the class:
There public data members:
ID (string)
Duration (GameDuration)
One private data member:
PayRate (float, between $1.50 and $5.00)
One default constructor to initialize the data members to "G000", ZERO, 0.0 for
duration and rate respectively.
quad One parameterized constructor to initialize the data members to specific values. If
value fails the above requirements, set it as the value of the default constructor.
A function getInfo() to get inputs for the information of a game.
A function showInfo() to display the information of a game as format:
ID Duration PayRate.
One mutator and one accessor for the private data member.
Implement all of the member functions of the class CGame. Then, use the following
function main() as a sample to test all of member functions of the class.
void main()
{
CGame firstGame;
cout "The default information of the first game:
";
firstGame.showInfo();
cout "Update information of the first game:
";
firstGame.getInFo();
cout "The updated information of the first game:
";
firstGame.showInfo();
cout "Modifying the pay rate to $3.00.
";
firstGame.setPayRate(3.0);
cout "The pay rate amount is now: " firstGame.getPayRate() endl;
CGame secondGame ("W0002", EIGHTY, 2.5);
cout "The initial information of the second game:
";
secondGame.showInfo();
cout "Modifying the pay rate to $3.25.
";
secondGame.setPayRate (3.25);
cout "The modified pay rate is now: " secondGame.getPayRate () endl;
cout "The updated information of the second game:
";
secondGame.showInfo();
}1. You are to define an enumeration type RefereeGrade including 5 values UNKNOWN, CLUB, STATE, NATIONAL and FIFA.
2. You are to write the definition for a class named CReferee. Followings are details for data members and member functions for the class:
- Three public data members:
- ID (string)
- First Name (string)
- Last Name (string)
- One private data member:
- Grade (RefereeGrade)
- One default constructor to initialize the data members to "R000", "None", "None" and UNKNOWN for ID, first name, last name and grade respectively.
- One parameterized constructor to initialize the data members ID, first name, last name and grade to specific values.
- A function getInfo() to get inputs for the information of a referee.
- A function showInfo() to display the information of a referee as format:
ID First Last Grade.
- One mutator and one accessor for the private data member.
3. Implement all of the member functions of the class CReferee. Then, use the following function main() as a sample to test all of member functions of the class.
```
void main()
{
CReferee firstRef;
cout "The default information of the first ref:
";
firstRef.showInfo();
firstRef.getInFo();
cout "The inputted information of the first ref:
";
firstRef.showInfo();
cout "Modifying the grade to NATIONAL.
";
firstRef.setGrade(NATIONAL);
cout "The referee grade is now: " firstRef.getGrade() endl;
CReferee secondRef ("R0002", "Arby", "Sample", CLUB);
cout "The initial information of the second ref:
";
secondRef.showInfo();
cout "Modifying the grade to STATE.
";
secondRef.setGrade (STATE);
cout "The modified grade is now: " secondRef.getGrade() endl;
cout "The updated information of the second ref:
";
secondRef.showInfo();
}
```
Help me solve please You are to write the

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!