|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gamekeeper2a.SimpleGamekeeper | +--gamekeeper2a.BaseballGamekeeper
A baseball keeper is aware of the fact that in baseball: 1. A high score wins 2. No ties are possible (keeper's upset over last year's All-Star Game) 3. Scores should be positive
Constructor Summary | |
BaseballGamekeeper()
Creates a new instance of BaseballGamekeeper |
Method Summary | |
protected boolean |
acceptGameResults(IGameResult gresult)
Private method to check the situation before passing it along to the superclass to accept the result. |
boolean |
acceptGameResults(java.lang.String gameString)
Remember the results of a game The contestant with the LARGER score is the winner. |
boolean |
acceptGameResults(java.lang.String contestant1,
int contestant1Score,
java.lang.String contestant2,
int contestant2Score)
Remember the results of a match. |
static void |
main(java.lang.String[] args)
Purely for testing. |
Methods inherited from class gamekeeper2a.SimpleGamekeeper |
acceptGameResults, acceptGameResults, findContestant, listContestantResults, listContestants, setGameResults, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public BaseballGamekeeper()
Method Detail |
public boolean acceptGameResults(java.lang.String gameString)
acceptGameResults
in class SimpleGamekeeper
public boolean acceptGameResults(java.lang.String contestant1, int contestant1Score, java.lang.String contestant2, int contestant2Score)
acceptGameResults
in class SimpleGamekeeper
protected boolean acceptGameResults(IGameResult gresult)
acceptGameResults
in class SimpleGamekeeper
public static void main(java.lang.String[] args)
args
- the command line arguments
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |