public static void Main()
var c1 = new Client("Alice", 'F');
var c2 = new Client("Bob", 'M');
var c3 = new Client("Carol", 'F');
var c4 = new Client("Dave", 'M');
Client[] clients = new[] { c1, c2, c3, c4 };
var all = new AllClient(clients);
string[] result = all.CheckGames(threshold);
Console.WriteLine($"Clients with more than {threshold} games:");
foreach (var id in result)
Console.WriteLine($" - {id}");
public Client(string id, char gender)
public string GetId() { return this.id; }
public char GetGender() { return this.gender; }
public int GetGames() { return this.games; }
public void SetId(string id) { this.id = id; }
public void SetGender(char gender) { this.gender = gender; }
public void SetGames(int games) { this.games = games; }
public AllClient(Client[] ar)
this.ar = new Client[ar.Length];
for (int i = 0; i < ar.Length; i++)
public string[] CheckGames(int num)
string[] ar2 = new string[this.ar.Length];
for (int i = 0; i < this.ar.Length; i++)
if (this.ar[i].GetGames() > num)
ar2[cnt] = this.ar[i].GetId();
public Student(string name, int[] arrTest)
this.arrTest = new int[arrTest.Length];
for (int i = 0; i < this.arrTest.Length; i++)
this.arrTest[i] = arrTest[i];
public Node (T value, Node<T> next)
public void SetValue (T value)
public void SetNext(Node<T> next)
return this.next != null;
public override String ToString()
return this.value.ToString();
Node<T> temp = new Node<T>(x);
T x=this.first.GetValue();
this.first=this.first.GetNext();
return this.first.GetValue();
public override String ToString ()
Node<T> pos = this.first;
str=str+pos.GetValue().ToString();