예제 #1
0
        //this method will display all the school info from a given scholl(without the comments)
        public static void DisplayTest(School temp)
        {
            Console.WriteLine("\nSchool name: " + temp.Name);

            Console.WriteLine("\nClasses:\n");

            foreach (Class classInSchool in temp.Classes)
            {
                Console.WriteLine(classInSchool.Name);
                Console.WriteLine();
                Student.DisplayStudents(classInSchool.Students);
                Console.WriteLine("\nTeachers : \n");

                foreach (Teacher teacher in classInSchool.Teachers)
                {
                    Console.Write(teacher.Name);
                    Console.WriteLine();

                    foreach (Discipline discipline in teacher.Disciplines)
                    {
                        Console.Write("\n" + discipline.Name + " " + discipline.LecturesCount + " hours lectures and " + discipline.ExercisesCount + " hours exercises");
                    }
                    Console.WriteLine();
                }

                Console.WriteLine();
            }
        }