Ejemplo n.º 1
0
 static void Main(string[] args)
 {
     Teacher[] teacher = new Teacher[Rnd.rnd.Next(1, 15)];
     for (int i = 0; i < teacher.Length / 3; i++)
     {
         teacher[i] = new Teacher(Rnd.rnd.Next(20, 35), Rnd.CreateName());
     }
     for (int i = teacher.Length / 3; i < teacher.Length; i++)
     {
         teacher[i] = new Teacher(Rnd.rnd.Next(35, 60), Rnd.CreateName(), Rnd.GetDegree());
     }
     Print(teacher);
     Console.Read();
 }
Ejemplo n.º 2
0
 static void Main(string[] args)
 {
     do
     {
         List <Student> lststd = new List <Student>();
         int            rnk    = Rnd.rnd.Next(5, 11);
         for (int i = 0; i < rnk; i++)
         {
             lststd.Add(new Student(Rnd.rnd.Next(0, 8), Rnd.GetSex(), Rnd.CreateName(), Rnd.rnd.Next(0, 10) + Rnd.rnd.NextDouble()));
             if (Student.CountOfStudents % 2 == 0)
             {
                 lststd[i].GetGraduate(Rnd.rnd);
             }
         }
         Print(lststd);
         Console.WriteLine("To exit push Escape");
     } while (Console.ReadKey(true).Key != ConsoleKey.Escape);
 }