Exemple #1
0
        static void Main(string[] args)
        {
            Prison   prison    = new Prison();
            Prisoner prisoner1 = new Prisoner("Евгений", "Японец", false, 170, 60);
            Prisoner prisoner2 = new Prisoner("Олег", "Вьетнамец", false, 170, 60);
            Prisoner prisoner3 = new Prisoner("Олег", "Вьетнамец", true, 170, 60);

            prison.AddPrisoner(prisoner1);
            prison.AddPrisoner(prisoner2);
            prison.AddPrisoner(prisoner3);

            Console.Write("Введите рост: ");
            int height = Convert.ToInt32(Console.ReadLine());

            Console.Write("Введите вес: ");
            int weight = Convert.ToInt32(Console.ReadLine());

            Console.Write("Введите национальность: ");
            string nationality = Console.ReadLine();

            prison.Search(height, weight, nationality);
            Console.ReadKey();
        }
Exemple #2
0
 public void AddPrisoner(Prisoner prisoner)
 {
     _prisoners.Add(prisoner);
 }