|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectSelfTester
public class SelfTester
SelfTester
The code that makes the voting machine test itself. When called upon, this code surfs through the ballot and automatically casts random votes, while remembering the number of votes cast. At the end, it will present its own tally for comparison.
Constructor Summary | |
---|---|
SelfTester(BallotGUI bg)
build a new testing harness that casts random votes |
|
SelfTester(BallotGUI bg,
java.lang.String ballotFileDir)
Build a new testing harness that casts the same votes as shown in the given ballot directory. |
Method Summary | |
---|---|
void |
test(int howMany)
Perform the test, casting the specified number of randomly decided ballots. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SelfTester(BallotGUI bg)
bg
- The GUI to manipulatepublic SelfTester(BallotGUI bg, java.lang.String ballotFileDir)
bg
- The GUI to manipulateballotFileDir
- The directory where to find votes to cast.Method Detail |
---|
public void test(int howMany)
howMany
- the number of ballots to cast.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |