Sie sind auf Seite 1von 2

When running your application, the end user can supply between 1 to 7 command-line arguments.

Assume the name of your application is LottoAnalysis


One command-line argument
If a person supplies one command-line argument as in
java LottoAnalysis arg1
arg1 must be 1 or 2. Where 1 denotes Jackpot only numbers and 2 denotes Jackpot and Bonus numbers.
Therefore if a person supplies
java LottoAnalysis 1
they want an analysis of Jackpot numbers (for the entire file, irrespective of dates, days or draw types)
Therefore if a person supplies
java LottoAnalysis 2
they want an analysis of Jackpot numbers and the Bonus Numbers (for the entire file, irrespective of dates, days or
draw types).
Two command-line arguments
If a person supplies two command-line arguments as in
java LottoAnalysis arg1 arg2
The first command-line argument is as already specified and the second command-line argument (i.e. arg2) must be
A or R or S or LP1 or LP2. Where A denotes all draws, R denotes regular draws only, S denotes Special draws only,
LP1 denotes Lotto Plus 1 draws only and LP2 denotes Lotto Plus 2 draws only.
If a person supplies two command-line arguments as in
java LottoAnalysis 2 LP1
this denotes the person wants all Jackpot and Bonus numbers analysed for Lotto Plus 1 draws only.
If a person supplies two command-line arguments as in
java LottoAnalysis 1 A
this denotes the person wants all Jackpot numbers analysed for all draws.
Three command-line arguments
If a person supplies three command-line arguments as in
java LottoAnalysis arg1 arg2 arg3
The first and second command-line arguments are as already specified and the third command-line argument (i.e.
arg3) must be 0, 1 or 2. Where 1 denotes all Wednesday draws and 2 denotes all Saturday draws and 0 denotes all
draws irrespective of day on which a draw took place.
If a person supplies three command-line arguments as in
java LottoAnalysis 2 R 1
this denotes the person wants all Jackpot and Bonus numbers analysed for all regular draws that took place on
Wednesdays.
Four command-line arguments
If a person supplies four command-line arguments as in
java LottoAnalysis arg1 arg2 arg3 arg4
arg4 must be a 4 digit year
If a person supplies four command-line arguments as in
java LottoAnalysis 2 R 1 2103
this denotes the person wants all Jackpot and Bonus numbers analysed for all regular draws that took place on
Wednesdays in 2013

Five command-line arguments


If a person supplies five command-line arguments as in
java LottoAnalysis arg1 arg2 arg3 arg4 arg5
arg4 and arg5 must be dates i.e. a start date and an end date
If a person supplies five command-line arguments as in
java LottoAnalysis 2 R 1 01/02/1998 12/2/2013
this denotes the person wants all Jackpot and Bonus numbers analysed for all regular draws that took place on
Wednesdays between 1 February 1998 and 12 February 2013 inclusive. Therefore, 1 or 2 values may be supplied for
a day part or a month part of a date.
Six command-line arguments
If a person supplies six command-line arguments it is assumed that they want the following functionality
undertaken.
Accept six numbers from the end user (in any order) and report on whether or not these numbers were ever the
Jackpot numbers. If they were, report the number of occasions. If they were not, list how many times 5 of these
numbers were among the Jackpot numbers, 4 of these numbers were among the Jackpot numbers and 3 of
these numbers were among the Jackpot numbers.
Seven command-line arguments
If a person supplies seven command-line arguments it is assumed that they want the following functionality
undertaken.
Accept seven numbers from the end user (6 numbers (in any order) and a bonus number) and report on whether
or not these numbers would have yielded any prize money. Prize money is paid
o if the punters numbers match the drawn numbers i.e. Jackpot Winner
o if 5 of the punters numbers and his/her bonus number match those drawn
o if 5 of the punters numbers match the drawn numbers
o if 4 of the punters numbers and his/her bonus number match those drawn
o if 4 of the punters numbers match the drawn numbers
o if 3 of the punters numbers and his/her bonus number match those drawn
o if 3 of the punters numbers match the drawn numbers
Other parts of project
In relation to
o number of times that all the Jackpot numbers were (i) even or (ii) odd
this functionality should be included when analysing all Jackpot numbers only
In relation to
o number of times that all the Jackpot numbers and the bonus number were (i) even or (ii) odd
this functionality should be included when analysing all Jackpot numbers and the bonus number
In relation to
o number of times for a year supplied by the user that the number of low winning numbers exceeded the
number of high winning numbers in each draw type
This functionality will be completed when the analysis is based on a year. You should assume a low number means
any number in the range 1 to 10 inclusive. A high number means within 10 numbers of the max number e.g. if max
number is 36 then the high winning numbers are those in the range 26 to 36 whereas if the max number is 45 then
the high winning numbers are those in the range 35 to 45.

Das könnte Ihnen auch gefallen