Question: You are to define an enumeration type GameDuration including 5 values ZERO = 0 , FIFTY = 9 0 , SLXTY = 6 0 ,

You are to define an enumeration type GameDuration including 5 values ZERO=0, FIFTY =90, SLXTY =60,SEVENTY=70, EIGHTY =80 and NINETY =90.
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.
One parameterizod constructor to initialize the data members to specifie values. If any value fails the above requirements, set it as the value of the default constructor.
A function getinfoo 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.
You are to define an enumeration type

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!