Definition: Award Criteria are the elements which may play a factor in whether a person has won an award. The actual computation of an award would best be contained as a separate object, since new kinds of awards can be added in the future, however unlikely. There are many criteria for an award. First, local awards may differ depending on age, there also may be differences based on the sex of the individual, or it may be the same for both sexes. Some awards may allow the prior year’s average to be used if there are not sufficient games in the current year. There may be national (sanctioning body) awards, local association awards, and even state awards. These would change if the country is not US. The award type might belong in the award computation object, but is shown here. Awards such as the triplicate award are not computed like high games or series. The same goes for pins over awards.
Issues:The order of checking for eligibility might be
tricky. Probably start with max average and score as this will eliminate
many. Next check if the required number of games, or prior year’s average
requirement is met. Then age, Eligibility, and sex. Checking the
Eligibility may require getting all previous awards for the Member/Bowler.
Creating and using the computation object may be a problem. The computation object will need access to the values in the award criteria object, in addition to the passed in series.
Variables: Variables here
| Modifier | Class | Name | Value | |
| Integer | serializableVersionUID | 1234567 |
Characteristics:
| Tic name | object | ||
| Name/Title | String | ||
| Maximum Average | Integer | ||
| Award Level (National, State) | Award Level Enum | ||
| Minimum Age | Integer | ||
| Award Score | Integer | ||
| Award Type (Game, Series, Other) | Award Type Enum | ||
| Prior Average Allowed | Boolean | ||
| Prior Average Games Required | Integer | ||
| Current Average Games Required | Integer | ||
| Sex Eligibility | SexAllowed Enum | ||
| Eligibility (Lifetime, Season, League) | Eligibility Enum | ||
| Computation Method | AwardComputation Object |
Requirments:
|
Required Methods:
|