|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--nog.Participants
Contains a number of participants.
Constructor Summary | |
Participants()
Default constructor. |
|
Participants(Participants p)
Constructor wich creats a copy of the Participants. |
|
Participants(java.lang.String filename)
Constructor with the filename as a String as input. |
Method Summary | |
boolean |
addPart(java.lang.String pString)
Adds a participant to Participants. |
void |
clearPart()
Clears the list with participants. |
java.lang.String |
get_filename()
Returns the filename of the file. |
java.util.Hashtable |
get_ht()
Returns the Harstable. |
int |
getCnt()
Returns the number of participants in Participants. |
static void |
main(java.lang.String[] args)
The main wich reads the "part.txt"-file and calculats the statistics. |
void |
stat_all()
Starts the calculation of the statistics. |
int |
stat_country(java.lang.String s)
Returns the share of that specific country. |
double |
stat_female()
Returns the share of female in %. |
double |
stat_height()
Returns the average height. |
double |
stat_men()
Returns the share of men in %. |
int |
stat_sport(java.lang.String s)
Returns the share of that specific sport. |
double |
stat_weight()
Returns the average weight. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public Participants()
public Participants(Participants p)
p
- the Participants to copy.public Participants(java.lang.String filename)
filename
- the filename to open.Method Detail |
public java.lang.String get_filename()
public java.util.Hashtable get_ht()
public double stat_height()
public double stat_weight()
public double stat_men()
public double stat_female()
public int stat_country(java.lang.String s)
s
- the country to get statistic about.public int stat_sport(java.lang.String s)
s
- the sport to get statistic about.public void stat_all()
public int getCnt()
public boolean addPart(java.lang.String pString)
pString
- the string containing all info about the participant to add.public void clearPart()
public static void main(java.lang.String[] args)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |