Question: please write in JAVA. Game simulation. In the game show Lets Make a Deal, a contestant is presented with three doors. Behind one of them
please write in JAVA.
Game simulation. In the game show Lets Make a Deal, a contestant is presented with three doors. Behind one of them is a valuable prize. After the contestant chooses a door, the host opens one of the other two doors (never revealing the prize, of course). The contestant is then given the opportunity to switch to the other unopened door. Should the contestant do so? Intuitively, it might seem that the contestants initial choice door and the other unopened door are equally likely to contain the prize, so there would be no incentive to switch. Write a program MonteHall to test this intuition by simulation. Your program should take a command-line argument n, play the game n times using each of the two strategies (switch or do not switch), and print the chance of success for each of the two strategies.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
