Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Note: Please use Java as it is for a Java Object oriented programming course. (Please use arrays if possible) Q2: Design and implement a game
Note: Please use Java as it is for a Java Object oriented programming course. (Please use arrays if possible)
Q2: Design and implement a game which is meant for two or more players. Each player starts out with 50 points, as each player takes a turn rolling the dice; the amount generated by the dice is subtracted from the player's points. The first player with exactly one point remaining wins. If a player's remaining points minus the amount generated by the dice results in a value less than one, then the amount should be added to the player's points. (As a alternative, the game can be played with a set number of turns. In this case the player with the amount of points closest to one, when all rounds have been played, wins.) Write a program that simulates the game being played by two players. Use the Die class that was presented during lecture time to simulate the dice. Write a Player class to simulate the player. Enter the player's names and display the die rolls and the totals after each roundStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started