edu.ucla.stat.SOCR.experiments
Class PokerDiceExperiment

java.lang.Object
  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
MultiplePartsPanel.SOCRToolBar
 
Field Summary
 
Fields inherited from class edu.ucla.stat.SOCR.core.Experiment
showModelDistribution
 
Fields inherited from class edu.ucla.stat.SOCR.core.MultiplePartsPanel
applet, fName, graphs, mainPane, recordTable, tables, toolbar, toolbar2, toolbars
 
Constructor Summary
PokerDiceExperiment()
          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
setApplet
 

Constructor Detail

PokerDiceExperiment

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

Method Detail

doExperiment

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

Specified by:
doExperiment in interface IExperiment
Overrides:
doExperiment in class Experiment

step

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
Overrides:
step in class Experiment

reset

public void reset()
Reset the experiment

Specified by:
reset in interface IExperiment
Overrides:
reset in class Experiment

update

public void update()
Update the display

Specified by:
update in interface IExperiment
Overrides:
update in class Experiment

itemStateChanged

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
Overrides:
itemStateChanged in class Experiment

evaluateHand

public int evaluateHand()
Evaluate the hand