Esempio n. 1
0
        public static void PrintAcademyInfo()
        {
            Console.WriteLine($"\nTOP STUDENTS (score >= 95%) : -------------\n ");

            foreach (var rec in AcademyHelper.GetTopStudents())
            {
                Console.WriteLine($"{rec.Key.Name} - {rec.Value}");
            }

            Console.WriteLine($"\nTOP COURSES (score >= 95%) : -------------\n ");

            foreach (var course in AcademyHelper.GetTopCourses(3))
            {
                Console.WriteLine($"{course.Name}");
            }
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            Participant participant1 = new Participant();

            participant1.FirstName   = "Miodrag";
            participant1.LastName    = "Cekikj";
            participant1.DateOfBirth = new DateTime(1989, 5, 15);
            participant1.Role        = AcademyRole.Trainer;
            participant1.Greetings();

            var participant2 = new Participant();

            participant2.FirstName   = "Goce";
            participant2.LastName    = "Kabov";
            participant2.DateOfBirth = new DateTime(1992, 5, 15);
            participant2.Role        = AcademyRole.Assistant;
            participant2.Greetings();

            var participant3 = new Participant("Bob", "Marley");

            participant3.Role       = AcademyRole.Assistant;
            Console.ForegroundColor = ConsoleColor.Yellow;
            participant3.PrintFullName();

            var participant4 = new Participant()
            {
                FirstName = "Tupac",
                LastName  = "Shakur",
                Subjects  = new string[] { "C# Basic", "C# Advanced" }
            };

            participant4.PrintFullName();

            var participants = new Participant[4];

            participants[0] = participant1;
            participants[1] = participant2;
            participants[2] = participant3;
            participants[3] = participant4;

            AcademyHelper.FindParticipantByRole(participants, AcademyRole.Trainer);

            Console.ReadLine();
        }
Esempio n. 3
0
        private static void ShowInformationOfExampleOfAcademy()
        {
            Console.WriteLine("¿Desea mostrar la información cargada por defecto de la Academia? si(s) / no(n)");
            var decision = Console.ReadLine()?.ToLower();

            if (decision != null && (decision.Equals("s") || decision.Equals("si")))
            {
                var academies = AcademyHelper.FillAcademies();
                var students  = StudentHelper.FillStudentsExample();

                var averageOfClassrooms  = AcademyHelper.GetAverageOfClassroom(academies);
                var quantityOfClassrooms = AcademyHelper.GetQuantityOfClassroom(academies);
                SchoolHelper.ConsoleWriteLine($"El promedio de aulas por academias es de: {averageOfClassrooms} " +
                                              $"para un total de {quantityOfClassrooms} aulas y {academies.Count} academias", Color.Aquamarine);

                var mensQuantity   = AcademyHelper.GetMensQuantity(academies, students);
                var womensQuantity = AcademyHelper.GetWomensQuantity(academies, students);

                SchoolHelper.ConsoleWriteLine($"El promedio en general de hombre es de: {mensQuantity} " +
                                              $"y de mujeres es de: {womensQuantity}", Color.Aquamarine);
            }
        }