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 values ZERO FIFTY SLXTY SEVENTY EIGHTY and NINETY
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 $ and $
One default constructor to initialize the data members to G ZERO, 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.
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
