public class Experiment
extends java.lang.Object
implements java.awt.event.KeyListener
Modifier and Type | Field and Description |
---|---|
java.io.FileWriter |
fw |
static boolean |
quitIfInvalid |
RHRandomNumberGenerator |
randGenerator |
boolean |
toFile |
Constructor and Description |
---|
Experiment(boolean saveToFile)
basic constructor
|
Modifier and Type | Method and Description |
---|---|
void |
doExperiment()
runs the experiment
|
void |
keyPressed(java.awt.event.KeyEvent e)
handle keyPressed event
|
void |
keyReleased(java.awt.event.KeyEvent e)
handle keyReleased event
|
void |
keyTyped(java.awt.event.KeyEvent e)
handle keyTyped event
|
void |
setDataOutFile(boolean quitIfInvalid)
create a new text file for the captured locations
|
public static boolean quitIfInvalid
public boolean toFile
public java.io.FileWriter fw
public RHRandomNumberGenerator randGenerator
public Experiment(boolean saveToFile) throws java.lang.Exception
saveToFile
- save the results to a file?java.lang.Exception
- ...public void setDataOutFile(boolean quitIfInvalid)
quitIfInvalid
- do the exitpublic void keyTyped(java.awt.event.KeyEvent e)
keyTyped
in interface java.awt.event.KeyListener
e
- the eventpublic void keyPressed(java.awt.event.KeyEvent e)
keyPressed
in interface java.awt.event.KeyListener
e
- the eventpublic void keyReleased(java.awt.event.KeyEvent e)
keyReleased
in interface java.awt.event.KeyListener
e
- the eventpublic void doExperiment() throws java.lang.Exception
java.lang.Exception
- ...RH, 2017