AddTeacher() public method

public AddTeacher ( Teacher, teacher ) : void
teacher Teacher,
return void
Ejemplo n.º 1
0
    static void Main()
    {
        SchoolClass PHPClass = new SchoolClass();

        Teacher firstTeacher = new Teacher("Ivan Vankov");
        PHPClass.AddTeacher(firstTeacher);

        Teacher secondTeacher = new Teacher("Stamat Trendafilov");
        PHPClass.AddTeacher(secondTeacher);

        Student newStudent = new Student("Dobromir Ivanov", "756A");
        PHPClass.AddStudent(newStudent);

        Console.WriteLine("List of all teachers: ");
        foreach (Human teacher in PHPClass.ClassTeachersList)
        {
            Console.WriteLine(teacher);
        }

        Console.WriteLine("\nList of all Students: ");
        foreach (Human student in PHPClass.ClassStudentsList)
        {
            Console.WriteLine(student);
        }
    }
Ejemplo n.º 2
0
    static void Main()
    {
        SchoolClass PHPClass = new SchoolClass();

        Teacher firstTeacher = new Teacher("Ivan Vankov");

        PHPClass.AddTeacher(firstTeacher);

        Teacher secondTeacher = new Teacher("Stamat Trendafilov");

        PHPClass.AddTeacher(secondTeacher);

        Student newStudent = new Student("Dobromir Ivanov", "756A");

        PHPClass.AddStudent(newStudent);

        Console.WriteLine("List of all teachers: ");
        foreach (Human teacher in PHPClass.ClassTeachersList)
        {
            Console.WriteLine(teacher);
        }

        Console.WriteLine("\nList of all Students: ");
        foreach (Human student in PHPClass.ClassStudentsList)
        {
            Console.WriteLine(student);
        }
    }
Ejemplo n.º 3
0
        static void Main()
        {
            //got inspired for the comments from one of your colleagues :)
            Discipline Chemistry   = new Discipline("Chemistry", 20, 2, "Chemisty is sux!");
            Discipline Mathematics = new Discipline("Mathematics", 30, 3, "Matematic is helpfull!");
            Discipline Literature  = new Discipline("Literature", 30, 3, "Literature is okay!");
            Discipline English     = new Discipline("English", 20, 2, "English is very important!");


            Teacher Mendeleev = new Teacher("Pascal", "Mendeleev", "1 + 1 = h2o");
            Teacher Dimcho    = new Teacher("Dimcho", "Negramotniq", "Sometimes Win Sometimes Lun");
            Teacher White     = new Teacher("Walter", "White", "You Know The Business And I Know The Chemistry");

            Mendeleev.AddDiscipline(Chemistry);
            Mendeleev.AddDiscipline(Mathematics);

            Dimcho.AddDiscipline(Literature);
            Dimcho.AddDiscipline(English);

            White.AddDiscipline(Chemistry);

            Student Ivancho = new Student("Ivancho", "Ivanov", 1, "The big boss");
            Student Mariika = new Student("Mariika", "Ivanova", 2, "Ivancho's girlfriend");
            Student Jesse   = new Student("Jesse", "Pinkman", 3, "Yo Bitch!");

            SchoolClass Overacheivers = new SchoolClass("1a", "Excellent");
            SchoolClass Narcos        = new SchoolClass("high level", "Haisenberg team");

            Overacheivers.AddTeacher(Mendeleev);
            Overacheivers.AddTeacher(Dimcho);

            Overacheivers.AddStudent(Ivancho);
            Overacheivers.AddStudent(Mariika);

            Narcos.AddTeacher(White);
            Narcos.AddStudent(Jesse);

            School PriBatJoro = new School();

            PriBatJoro.AddClass(Overacheivers);
            PriBatJoro.AddClass(Narcos);

            List <IComment> comments = new List <IComment>()
            {
                Mendeleev, Dimcho, White, Ivancho, Mariika, Jesse, Chemistry, Mathematics, Literature, English, Overacheivers, Narcos
            };

            foreach (var obj in comments)
            {
                Console.WriteLine(obj.Comment);
            }
        }
Ejemplo n.º 4
0
    public static void Main()
    {
        SchoolClass firstClass = new SchoolClass();

        Teacher firstTeacher = new Teacher("Ivan");
        firstClass.AddTeacher(firstTeacher);

        Teacher secondTeacher = new Teacher("Stoian");
        firstClass.AddTeacher(secondTeacher);

        Teacher thirdTeacher = new Teacher("Dragan");
        firstClass.AddTeacher(thirdTeacher);
        thirdTeacher.AddComment("Test wtf!");

        Console.WriteLine(thirdTeacher.Comments[0]);

        foreach (var teacher in firstClass.SetOfTeachers)
        {
            teacher.Name = "test";
        }
    }
Ejemplo n.º 5
0
    static void Main()
    {
        School firstLanguageSchool = new School("First Language School");

        Discipline math = new Discipline("Basic Mathematics", 15, 11, "Kofti predmet");
        Discipline math2 = new Discipline("Mathematics 2-nd part", 14, 2);
        Console.WriteLine(math);

        Teacher first = new Teacher("Kolio", "Ivanov", "Idiot");
        first.AddDiscipline(math);
        first.AddDiscipline(math2);
        Console.WriteLine(first);

        Student firstStudent = new Student("Liolio", "Peshev", "Very poor performance", "11b");
        Console.WriteLine(firstStudent);

        SchoolClass eleven = new SchoolClass("Eleventh grade");
        eleven.AddTeacher(first);
    }
Ejemplo n.º 6
0
    static void Main()
    {
        School firstLanguageSchool = new School("First Language School");

        Discipline math  = new Discipline("Basic Mathematics", 15, 11, "Kofti predmet");
        Discipline math2 = new Discipline("Mathematics 2-nd part", 14, 2);

        Console.WriteLine(math);

        Teacher first = new Teacher("Kolio", "Ivanov", "Idiot");

        first.AddDiscipline(math);
        first.AddDiscipline(math2);
        Console.WriteLine(first);

        Student firstStudent = new Student("Liolio", "Peshev", "Very poor performance", "11b");

        Console.WriteLine(firstStudent);

        SchoolClass eleven = new SchoolClass("Eleventh grade");

        eleven.AddTeacher(first);
    }
Ejemplo n.º 7
0
        public static void Test()
        {
            Console.WriteLine("**********TASK1**********\n");

            Discipline ComputerScience = new Discipline("Computer Science", 20, 2, "Code all day.");
            Discipline Physics         = new Discipline("Physics", 10, 2, "Physics makes the world go round.");
            Discipline Mathematics     = new Discipline("Mathematics", 30, 3, "2 + 2 = 4");
            Discipline Literature      = new Discipline("Literature", 30, 3, "To be or not to be.");
            Discipline English         = new Discipline("English", 20, 2, "A is for apple, B is for bee.");

            Teacher ItTeacher             = new Teacher("Doncho", "Donchev", "Hello World!");
            Teacher NaturalScienceTeacher = new Teacher("Albert", "Einstein", "E=mc2");
            Teacher LitTeacher            = new Teacher("Will", "Shakespeare", "Shake your spear at Shakespeare");

            NaturalScienceTeacher.AddDiscipline(Mathematics);
            NaturalScienceTeacher.AddDiscipline(Physics);

            ItTeacher.AddDiscipline(ComputerScience);

            LitTeacher.AddDiscipline(English);
            LitTeacher.AddDiscipline(Literature);

            Student Pesho  = new Student("Petyr", "Nizamov", 1, "Momma's boy");
            Student Mara   = new Student("Mariika", "Ivanova", 2, "Pesho's girlfriend");
            Student Ivan   = new Student("Vanko", "Marinov", 3, "Teacher's pet");
            Student Joanna = new Student("Joanna", "Petrova", 4, "Prom's queen");
            Student Plamen = new Student("Plamen", "Petrov", 6, "Joanna's twin brother");
            Student Joro   = new Student("Joro", "Martinov", 10, "The school's bully");

            SchoolClass FirstGrades = new SchoolClass("1a", "We are firstgraders.");
            SchoolClass Seniors     = new SchoolClass("12a", "Final year of school.");

            FirstGrades.AddTeacher(NaturalScienceTeacher);
            FirstGrades.AddTeacher(LitTeacher);

            Seniors.AddTeacher(ItTeacher);
            Seniors.AddTeacher(NaturalScienceTeacher);

            FirstGrades.AddStudent(Pesho);
            FirstGrades.AddStudent(Mara);
            FirstGrades.AddStudent(Ivan);

            Seniors.AddStudent(Joanna);
            Seniors.AddStudent(Plamen);
            Seniors.AddStudent(Joro);

            School PMG = new School();

            PMG.AddClass(FirstGrades);
            PMG.AddClass(Seniors);

            List <IComment> comments = new List <IComment>()
            {
                NaturalScienceTeacher, ItTeacher, LitTeacher, Pesho, Mara, Ivan, Joanna, Plamen, Joro, Physics, Mathematics, Literature, English, FirstGrades, Seniors
            };

            foreach (var obj in comments)
            {
                Console.WriteLine(obj.ToString());
                Console.WriteLine("Personal comment: {0}", obj.Comment);
                Console.WriteLine(new string('-', 30));
            }
        }
Ejemplo n.º 8
0
 public void Teach(SchoolClass clas)
 {
     clas.AddTeacher(this);
 }