Beispiel #1
0
 public virtual bool enterTo(Auditory obj)
 {
     getFree();
     Controls = obj.enter(this);
     if (Controls.Count == null)
     {
         return(false);
     }
     return(true);
 }
Beispiel #2
0
        static void Main(string[] args)
        {
            StreamReader dir         = File.OpenText("..\\..\\..\\dirStudentsName.txt");
            StreamReader lectureText = File.OpenText("..\\..\\..\\lectureText.txt");
            Auditory     main        = new Auditory("112", 30);

            for (int i = 0; i < 1; i++)
            {
                new Students(dir.ReadLine()).enterTo(main);
            }
            for (int i = 0; i < 2; i++)
            {
                new Magiters(dir.ReadLine()).enterTo(main);
            }
            Professor host = new Professor("Vladimir Vladimirovich");

            host.enterTo(main);
            while (!lectureText.EndOfStream)
            {
                host.say(lectureText.ReadLine());
            }
            host.ReleaseRoom();
        }