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