Real Lab #1 -
Game Simulation
You've been invited to participate in a TV game show at NBC where you could win a free new car. When you play, you are asked to choose one box from three. Only one of the boxes contains a prize; the other two boxes contain lemons. When you have chosen your box, but before you open it, the game show host will open one of the two remaining boxes and show you a lemon. At this point you have three possible strategies:
When you play the game, which of the the three strategies should you adopt? Write a JAVA program to help you decide. The program should simulate playing the game a large number of times (to be specified by the user), with each of the three strategies to see which one offers you the best chance of winning. You may be surprised at the result!
Be creative but simple with your GUI design ... this simulation may end up on the web!
Due: 2 1/2 weeks (3/15) via FTP - remember, no floppy disk submissions are allowed.
Last updated by DrB
on 18 February 2009