static void Main()
 {
     Console.WriteLine("Small Test:");
     Student mara = new Student("Mara", 55);
     Student pesho = new Student("Pesho", 44);
     Teacher joro = new Teacher("Joro");
     Discipline math = new Discipline("Mathematics", 15, 4);
     joro.AddDiscipline(math);
     SchoolClass myClass = new SchoolClass("1a");
     myClass.AddStudent(mara);
     myClass.AddStudent(pesho);
     myClass.AddTeacher(joro);
     Console.WriteLine(myClass);
     try
     {
         SchoolClass myClass2 = new SchoolClass("1a");
     }
     catch (ArgumentException e)
     {
         Console.WriteLine(e.Message);
     }
     try
     {
         Student gosho = new Student("Gosho", 44);
     }
     catch (ArgumentException e)
     {
         Console.WriteLine(e.Message);
     }
 }
Example #2
0
        static void Main()
        {
            School mySchool = new School("Telerik Academy");

            // Creating students
            Student[] studentsFirstGroup = new Student[]
            {
                new Student("Georgi Yonchev", 2342032),
                new Student("Stamat Stamatov", 3023224),
                new Student("Pesho Ivanov", 3023434),
                new Student("Georgi Ivanov", 2223434),
                new Student("Mariya Ivanova", 4566434),
                new Student("Pesho Todorov", 2000032)
            };

            Student[] studentsSecondGroup = new Student[]
            {
                new Student("Georgi Petrov", 1342032),
                new Student("Albenoa Kalinova", 2333224),
                new Student("Zahari Zahariev", 3023555),
                new Student("Hristo Georgiev", 2234554),
                new Student("Nikoleta Zlatkova", 7765004),
                new Student("Nikoleta Chaneva", 3023100)
            };

            // Creating disciplines
            Discipline cSharp = new Discipline("C Sharp Fundamentals", 30, 30);
            Discipline javaScript = new Discipline("JavaScript Fundamentals", 40, 50);
            Discipline html = new Discipline("HTML5", 12, 13);
            Discipline css = new Discipline("CSS3");

            // Creating teachers
            Teacher teacher1 = new Teacher("Nikolay Kostov");
            Teacher teacher2 = new Teacher("Ivaylo Kenov");
            Teacher teacher3 = new Teacher("Doncho Minkov");
            Teacher teacher4 = new Teacher("Evlogi Hristov");

            teacher1.AddDiscipline(javaScript, html, css);
            teacher2.AddDiscipline(cSharp);
            teacher3.AddDiscipline(html);
            teacher4.AddDiscipline(css);

            // Creating Group classes
            SchoolClass firstGroupClass = new SchoolClass("First Group-morning");
            SchoolClass secondGroupClass = new SchoolClass("Second Group-evening");

            firstGroupClass.AddTeacher(teacher1, teacher2);
            secondGroupClass.AddTeacher(teacher1, teacher3, teacher4);

            firstGroupClass.AddStudent(studentsFirstGroup);
            secondGroupClass.AddStudent(studentsSecondGroup);

            mySchool.AddClass(firstGroupClass);
            mySchool.AddClass(secondGroupClass);
            Console.WriteLine(mySchool);
        }
Example #3
0
        static void Main()
        {
            School mySchool = new School("Telerik Academy");

            // Creating students
            Student[] studentsFirstGroup = new Student[]
            {
                new Student("Georgi Yonchev", 2342032),
                new Student("Stamat Stamatov", 3023224),
                new Student("Pesho Ivanov", 3023434),
                new Student("Georgi Ivanov", 2223434),
                new Student("Mariya Ivanova", 4566434),
                new Student("Pesho Todorov", 2000032)
            };

            Student[] studentsSecondGroup = new Student[]
            {
                new Student("Georgi Petrov", 1342032),
                new Student("Albenoa Kalinova", 2333224),
                new Student("Zahari Zahariev", 3023555),
                new Student("Hristo Georgiev", 2234554),
                new Student("Nikoleta Zlatkova", 7765004),
                new Student("Nikoleta Chaneva", 3023100)
            };

            // Creating disciplines
            Discipline cSharp     = new Discipline("C Sharp Fundamentals", 30, 30);
            Discipline javaScript = new Discipline("JavaScript Fundamentals", 40, 50);
            Discipline html       = new Discipline("HTML5", 12, 13);
            Discipline css        = new Discipline("CSS3");

            // Creating teachers
            Teacher teacher1 = new Teacher("Nikolay Kostov");
            Teacher teacher2 = new Teacher("Ivaylo Kenov");
            Teacher teacher3 = new Teacher("Doncho Minkov");
            Teacher teacher4 = new Teacher("Evlogi Hristov");

            teacher1.AddDiscipline(javaScript, html, css);
            teacher2.AddDiscipline(cSharp);
            teacher3.AddDiscipline(html);
            teacher4.AddDiscipline(css);

            // Creating Group classes
            SchoolClass firstGroupClass  = new SchoolClass("First Group-morning");
            SchoolClass secondGroupClass = new SchoolClass("Second Group-evening");

            firstGroupClass.AddTeacher(teacher1, teacher2);
            secondGroupClass.AddTeacher(teacher1, teacher3, teacher4);

            firstGroupClass.AddStudent(studentsFirstGroup);
            secondGroupClass.AddStudent(studentsSecondGroup);

            mySchool.AddClass(firstGroupClass);
            mySchool.AddClass(secondGroupClass);
            Console.WriteLine(mySchool);
        }
        static void Main()
        {
            var school = new School();

            school.AddSchoolClass(new SchoolClass("2A"));
            school.AddSchoolClass(new SchoolClass("3G"));
            SchoolClass clas = new SchoolClass("4A");

            clas.AddTeacher(new Teacher("Ivan Penchev"));
            clas.AddStudent(new Student("Valeri Velinov", 5));
            Console.WriteLine(clas.ClassIdentifier);
            school.Classes.Clear();
            Console.WriteLine(school.Classes);
        }