public Athelete(string name, int age)
public Athelete(Athelete temp)
public void setName(string name)
public void setAge(int age)
public void setJumps(int[] jumps)
for (int i = 0; i < jumps.Length; i++)
this.jumps[i] = jumps[i];
int counter = 0, sum = 0;
for (int i = 0; i < this.jumps.Length; i++)
double avg = sum / counter;
public bool isOlder(Athelete sp)
private Athelete[] atheletes;
this.atheletes = new Athelete[10];
public Team(string name, Team t)
this.atheletes = new Athelete[10];
for (int i = 0; i < atheletes.Length; i++)
this.atheletes[i] = t.atheletes[i];
public void setName(string name)
public void setAtheletes(Athelete[] athelets)
for (int i = 0; i < atheletes.Length; i++)
this.atheletes[i] = atheletes[i];
public string getName(string name)
return this.teamName = name;
public Athelete[] getAtheletes()
public Athelete lowestAvgJumps()
for (int i = 0; i < 10; i++)
if (this.atheletes[i].avgJumps() < min)
temp = this.atheletes[i];
public int amountOfAth(Athelete sp)
for (int i = 0; i < 10; i++)
if (this.atheletes[i].getAge() < sp.getAge())
public void nameOfAth(Athelete sp)
string[] temp = new string[10];
for (int i = 0; i < temp.Length; i++)
if (this.atheletes[i].avgJumps() < sp.avgJumps())
temp[counter] = this.atheletes[i].getName();
Console.Write(this.atheletes[i].getName() + " ");
static void Main(string[] args)
Console.WriteLine("Enter a name for team");
string teamname = Console.ReadLine();
Team tm = new Team(teamname);
Console.WriteLine("Enter a name for team");
teamname = Console.ReadLine();
Team sp = new Team(teamname);
double min = double.MaxValue;
for (int i = 0; i < tm.getAtheletes().Length; i++)
if (tm.getAtheletes()[i].avgJumps() < min)
min = tm.getAtheletes()[i].avgJumps();
Console.WriteLine("Lowest avg in tm team: " + min);