Ejemplo n.º 1
0
 public Patient(WaitingRoom wr)
 {
     ok                 = false;
     this.wr            = wr;
     wr.NumberChange   += ReactToNumber;
     this.numberInQueue = this.wr.DrawNumber();
     Console.Out.WriteLine("Patient " + numberInQueue + " enters waiting room");
 }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            WaitingRoom waitingRoom = new WaitingRoom();
            Patient     p1          = new Patient(waitingRoom);
            Patient     p2          = new Patient(waitingRoom);
            Patient     p3          = new Patient(waitingRoom);

            waitingRoom.RunWaitingRoom();
        }