Class PokerDiceExperiment

  extended by edu.ucla.stat.SOCR.core.SOCRValueSettable
      extended by edu.ucla.stat.SOCR.core.MultiplePartsPanel
          extended by edu.ucla.stat.SOCR.core.Experiment
              extended by edu.ucla.stat.SOCR.experiments.PokerDiceExperiment
All Implemented Interfaces:
IExperiment, IValueSettable, Pluginable, java.awt.event.ActionListener, java.awt.event.ItemListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.lang.Runnable, java.util.EventListener, java.util.Observer

public class PokerDiceExperiment
extends Experiment

The poker dice exeperiment consists of rolling 5 dice. The variable of interest is the type of hand: one pair, two pair, three of a kind, four of a kind, five of a kind, or straight.

Nested Class Summary
Nested classes/interfaces inherited from class edu.ucla.stat.SOCR.core.MultiplePartsPanel
Field Summary
Fields inherited from class edu.ucla.stat.SOCR.core.Experiment
Fields inherited from class edu.ucla.stat.SOCR.core.MultiplePartsPanel
applet, fName, graphs, mainPane, recordTable, tables, toolbar, toolbar2, toolbars
Constructor Summary
          Initialize the experiment: graphs, tables, dice
Method Summary
 void doExperiment()
          This method defines the experiment.
 int evaluateHand()
          Evaluate the hand
 void itemStateChanged(java.awt.event.ItemEvent event)
          This method causes the experiment to stop when the hand is a certain value.
 void reset()
          Reset the experiment
 void step()
          This method runs the the experiment one time, and add sounds depending on the outcome of the experiment.
 void update()
          Update the display
Methods inherited from class edu.ucla.stat.SOCR.core.Experiment
actionPerformed, getAppletInfo, getDisplayPane, getInstance, getName, getOnlineDescription, getResultTable, getStopChoice, getStopFreq, getTime, getUpdateChoice, graphUpdate, initialize, pasteData, resetUpdateCount, run, setShowModelDistribution, setStopFreq, setStopNow, stop
Methods inherited from class edu.ucla.stat.SOCR.core.MultiplePartsPanel
addGraph, addTable, addTool, addTool2, addToolbar, format, getMainPanel, getRecordTable, getTextPanel, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, play, removeToolbar, setApplet, setName, update
Methods inherited from class edu.ucla.stat.SOCR.core.SOCRValueSettable
createComponentSetter, createValueSetter, createValueSetter, createValueSetter, createValueSetter, getComponentSetter, getComponentSetters, getValueSetter, getValueSetters
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface edu.ucla.stat.SOCR.core.Pluginable

Constructor Detail


public PokerDiceExperiment()
Initialize the experiment: graphs, tables, dice

Method Detail


public void doExperiment()
This method defines the experiment. The dice are rolled and the hand evaluate

Specified by:
doExperiment in interface IExperiment
doExperiment in class Experiment


public void step()
This method runs the the experiment one time, and add sounds depending on the outcome of the experiment.

Specified by:
step in interface IExperiment
step in class Experiment


public void reset()
Reset the experiment

Specified by:
reset in interface IExperiment
reset in class Experiment


public void update()
Update the display

Specified by:
update in interface IExperiment
update in class Experiment


public void itemStateChanged(java.awt.event.ItemEvent event)
This method causes the experiment to stop when the hand is a certain value. The method overrides the corresponding method in the parent class Experiment

Specified by:
itemStateChanged in interface java.awt.event.ItemListener
itemStateChanged in class Experiment


public int evaluateHand()
Evaluate the hand