Question: Hello, I would like help answering this Java question. I am suppose to be working with methods as a beginner. Please explain in detail what
Hello, I would like help answering this Java question. I am suppose to be working with methods as a beginner. Please explain in detail what you do.
Here is the question:
PROGRAM 1 Write a program that simulates the Monty Hall Game. Don't forget to validate user input and use methods, in addition to main() to perform major tasks. The Monty Hall Game is named after a host of a television game show from the 70's in which a contestant could win a new car by guessing the right door that the car was behind. It became a popular puzzle because the best playing strategy in counter-intuitive. The game is played in the following manner:
- The contestant(user) chooses one door (1, 2, or 3).
- Monty then opens one of the other doors that does NOT have the car behind it.
- At this point in the game, the contestant has the option of changing his mind. They can remain with their original door selection or choose the other closed door.
Guidelines
- In this game you will need to generate a random number representing the door that has the car behind it. Your program must be able to generate a random integer between 1 and 3.
- Allow your user to change their mind by asking them a yes or no style question. Respond to 'y' as a yes and all other answers as no.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
