implemented newAthlete()
This commit is contained in:
parent
e838d57eb6
commit
4f6f24ff82
|
@ -12,8 +12,8 @@ public class Athlete implements ComparableContent<Athlete>{
|
||||||
long startTime;
|
long startTime;
|
||||||
long endTime;
|
long endTime;
|
||||||
|
|
||||||
public Athlete(String pName) {
|
public Athlete() {
|
||||||
name = pName;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getName(){
|
public String getName(){
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
|
||||||
|
|
||||||
|
public class Competition
|
||||||
|
{
|
||||||
|
List <Athlete>athletes;
|
||||||
|
|
||||||
|
public Competition()
|
||||||
|
{
|
||||||
|
athletes = new List<Athlete>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void newAthlete(){
|
||||||
|
athletes.append(new Athlete());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue