This class models the famous Monty Hall game. A car is behind one door, goats are behind the other two. The player first chooses a door. Then the host opens a different door. The player can stay with her original choice or switch to the remaining door. A screen shot is shown below; click on the graphic to view the live applet and for a more detailed mathematical description.
To add the applet to your web page, first download objects.jar. Next, insert the following in your HTML file, at the point where you want the applet to appear:
<applet code="edu.uah.math.experiments.MontyHallGame.class" archive="address/objects.jar" width="500" height="450"></applet>
where address is the URL address of the JAR file. For example, if the JAR file and the HTML file are in the same folder, the archive property is simply archive="objects.jar". The width and height dimensions are simply suggestions and can be varied. Generally, components such as graphs and tables expand and contract proportionally, while components such as buttons, scrollbars, dice, and coins are fixed in size.
The text area below gives the code for this object, so that you can browse the constructors, methods, and properties of the object. Of course, this source file is part of objects.zip, which contains the source and resource files for all objects in all three packages.