public bool AddStudent(Student person)
 {
     for(int i = 0; i<_students.Length; i++)
     {
         if (_students[i] == null)
         {
             _students[i] = person;
             return true;
         }
     }
     return false;
 }
Beispiel #2
0
        static void Main(string[] args)
        {
            Student newSt1 = new Student("Arlen Maratov" , 18 , 3.9 , "15BD02055" , false);
            Student newSt2 = new Student ("Nurai Kim" , 17 , 4, "15BD02056" , true );
            Console.WriteLine(newSt1.ToString());
            newSt1.IsGrant();
            Console.WriteLine(newSt2.ToString());
            newSt2.IsGrant();

            Console.ReadKey();

        }
Beispiel #3
0
 static void Main(string[] args)
 {
     Student obj = new Student(" Gaziz", "123DA78JD", 3.44);
     Console.WriteLine(obj.GetID());
     obj.SetGPA(3.56);
     Student obj2 = new Student("Alibi", "123DA78J3", 3.89);
     if (obj > obj2)
     {
         Console.WriteLine("Perviy student");
     }
     else
     {
         Console.WriteLine("Vtoroy student");
     }
     //Object
     Student c = obj + obj2;
     //c.
     Console.WriteLine(c);
     Console.ReadKey();
 }