Note:Need to use arrays and Joptionpane
Create an application that simulates the outcome of a dice game that
Runs the simulation 1 million times.
Do not report results until the simulation has ended.
Reports the number of times the game results in a roll of 5-of-a-kind , 4 of a kind.
Calculate the expected value of a single game that is played when the pot has $865 in it, and the cost of a frosty mug of Fat Tire is $3.50. Expected value is the sum of the probability of each outcome multiplied by the benefit of each outcome. That is,
a. (prob of win * $865) + (prob of free drink * $3.50)
Rules of the dice game:
1. The game is played with 5 dice
2. All the dice are rolled on each turn
3. Each game consists of 3 turns, unless
a. A roll of 3-of-a-kind does not count (a free turn)
b. A roll of 5-of-a-kind immediately ends the game
4. A roll of 4-of-a-kind results in a free drink for the player.
1.All tasks must be completed to receive credit for this assignment
2. Program should report the correct values
a. Including free rolls, there are about 3.71 rolls per game
b. The game should produce ~2850 wins
c. You should get ~71,000 free drinks.Attachments
//increment free drinks
//increment number of wins
rollRemaining = 0;
//decrement rolls remaining
//increment total number of rolls