Beispiel #1
0
 public void FillArrays(ref ClubMember[] arr)
 {
     for (int i = 0; i < arr.Length; i++)
     {
         arr[i] = CMFactory.GetClubMember();
     }
 }
Beispiel #2
0
        private void Exercise3()
        {
            Console.WriteLine("Exercise 3");
            ClubMember clubMember1 = new ClubMember(0, "Matt", "Peterson", 18);
            ClubMember clubMember2 = new ClubMember(1, "Matt", "Perry", 26);
            ClubMember clubMember3 = new ClubMember(2, "Anthony", "Peterson", 52);
            ClubMember clubMember4 = new ClubMember(3, "Carmelo", "Anthony", 30);

            linkedList.Insert(clubMember2);
            linkedList.Insert(clubMember1);
            linkedList.Insert(clubMember4);
            linkedList.Insert(clubMember3);
            for (int i = 0; i < 10; i++)
            {
                linkedList.Insert(CMFactory.GetClubMember());
            }
            PrintList();
            linkedList.SortNr();
            PrintList();
        }