public void AddToRoom() { RoomKeeper currentlyInRoom = new RoomKeeper(); MaxStudent availablePlaces = new MaxStudent(); var maxStudents = availablePlaces.MaxStudents(); while (currentlyInRoom.newPerson.Count < maxStudents) { var addPerson = new MaxStudent(); currentlyInRoom.newPerson.Add(addPerson); Console.WriteLine($"Currently in room {currentlyInRoom.newPerson.Count} people"); } }
public void NewTeacher() { Random rnd = new Random(); int newTeacher = rnd.Next(1, 2); RoomKeeper teacher = new RoomKeeper(); if (newTeacher == 1) { var addTeacher = new MaxStudent(); teacher.Add(addTeacher); Console.WriteLine("The teacher is already in the room"); } else { Console.WriteLine("There is no teacher in the room"); } }