A game of throwing dice is played between two players. Each player throws a dice unless his/her score adds up to 20. The player getting score 20 in the minimum number of throws is declared the winner. Define a class Game with the following specifications:
Data Members: Name, player number
Member methods:
i) To accept the details of the player
ii) To compute the number of tries by each player to get score 20
iii) To display the result
Write a main method to create an object of a class and call the above member methods.
Answers
Answered by
0
Answer:
option (ii)
Explanation:
to copmpute the number of ties by each player to get score 20
Similar questions
Math,
4 months ago
Math,
4 months ago
Computer Science,
4 months ago
Hindi,
8 months ago
Accountancy,
8 months ago
Hindi,
1 year ago