| 
|||||||||
| 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.
| Field Summary | |
 java.lang.String | 
statistics_
 | 
| 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()
Removes all the participants.  | 
 java.lang.String | 
get_filename()
Returns the filename of the file.  | 
 java.util.Hashtable | 
get_ht()
Returns the Harstable.  | 
 int | 
getCnt()
Retrurn the number of participants in Participants.  | 
 java.lang.String | 
getFirstParticipant()
Returns the participant with nr nr.  | 
 java.lang.String | 
getLastParticipant(java.lang.String nr)
Returns the participant before nr nr.  | 
 java.lang.String | 
getNextParticipant(java.lang.String nr)
Returns the Next participant after nr nr.  | 
static void | 
main(java.lang.String[] args)
Main, opens the "part.txt" file and calculates statistics.  | 
 void | 
saveFile()
Stores the file.  | 
 void | 
saveFile(java.lang.String filename)
Stores the file with a new filename.  | 
 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.  | 
 java.lang.String | 
Stat()
Calculates the statistics and returns it as a String.  | 
| Methods inherited from class java.lang.Object | 
clone, 
equals, 
finalize, 
getClass, 
hashCode, 
notify, 
notifyAll, 
toString, 
wait, 
wait, 
wait | 
| Field Detail | 
public java.lang.String statistics_
| 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 java.lang.String getFirstParticipant()
nr - the Number of the participant.public java.lang.String getNextParticipant(java.lang.String nr)
nr - the Number of the participant.public java.lang.String getLastParticipant(java.lang.String nr)
nr - the Number of the participant.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 java.lang.String Stat()
public int getCnt()
public boolean addPart(java.lang.String pString)
pString - the informtaion about the participant.public void clearPart()
public void saveFile(java.lang.String filename)
filename - the new filename.public void saveFile()
public static void main(java.lang.String[] args)
  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||