This class models the famous Monty Hall experiment. There are three doors; a car is behind one, goats are behind the other two. The player selects a door and then the host opens another door. The player is given the option of keeping her original choice or switching to the other unopened 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.MontyHallExperiment.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.