Ejemplo n.º 1
0
        static void Main()
        {
            List <Student> students = new List <Student>
            {
                new Student("Gosho", 1),
                new Student("Pesho", 3),
                new Student("Tosho", 2),
                new Student("Ivan", 4),
                new Student("Gergana", 5)
            };

            var html = new Discipline("HTML", 1);

            html.AddStudent(students[0]);
            html.AddStudent(students[2]);
            html.AddStudent(students[4]);
            html.Ditails = "Fast-Track";

            var css = new Discipline("CSS", 2);

            css.AddStudent(students[0]);
            css.AddStudent(students[1]);
            css.AddStudent(students[2]);

            var csharp = new Discipline("C#", 3);

            csharp.AddStudent(students[1]);
            csharp.AddStudent(students[3]);
            csharp.AddStudent(students[4]);

            var javaScript = new Discipline("JavaScript", 4, students);

            var cSharpTeacher = new Teacher("Svetlin Nakov");

            cSharpTeacher.AddDiscipline(csharp);

            var webFundamentalsTeacher = new Teacher("Vladimir Georgiev");

            webFundamentalsTeacher.AddDiscipline(html);
            webFundamentalsTeacher.AddDiscipline(css);

            var classA = new Class("A", new List <Teacher> {
                cSharpTeacher, webFundamentalsTeacher
            });

            Console.WriteLine(classA.ToString());
        }
Ejemplo n.º 2
0
        static void Main()
        {
            List<Student> students = new List<Student>
            {
                new Student("Gosho", 1),
                new Student("Pesho", 3),
                new Student("Tosho", 2),
                new Student("Ivan", 4),
                new Student("Gergana", 5)
            };

            var html = new Discipline("HTML", 1);
            html.AddStudent(students[0]);
            html.AddStudent(students[2]);
            html.AddStudent(students[4]);
            html.Ditails = "Fast-Track";

            var css = new Discipline("CSS", 2);
            css.AddStudent(students[0]);
            css.AddStudent(students[1]);
            css.AddStudent(students[2]);

            var csharp = new Discipline("C#", 3);
            csharp.AddStudent(students[1]);
            csharp.AddStudent(students[3]);
            csharp.AddStudent(students[4]);

            var javaScript = new Discipline("JavaScript", 4, students);

            var cSharpTeacher = new Teacher("Svetlin Nakov");
            cSharpTeacher.AddDiscipline(csharp);

            var webFundamentalsTeacher = new Teacher("Vladimir Georgiev");
            webFundamentalsTeacher.AddDiscipline(html);
            webFundamentalsTeacher.AddDiscipline(css);

            var classA = new Class("A", new List<Teacher> { cSharpTeacher, webFundamentalsTeacher });

            Console.WriteLine(classA.ToString());
        }
Ejemplo n.º 3
0
        static void Main()
        {
            List <Student> myStudents = new List <Student>
            {
                new Student("Minka", 640927, "excellent at hystory"),
                new Student("Dido", 645820),
                new Student("Hristo", 340981, "very badly behave yourself")
            };
            Student Pesho = new Student("Pesho", 123456, "very good at math");
            Student Gosho = new Student("Gosho", 356272);

            myStudents.Add(Pesho);
            myStudents.Add(Gosho);

            //foreach (var student in myClass)
            //{
            //    Console.WriteLine(student);
            //}

            List <Discipline> myDisciplines = new List <Discipline>
            {
                new Discipline("HTML&CSS", 10, myStudents, "3 times a week"),
                new Discipline("JavaScript", 8, myStudents),
                new Discipline("PHP", 12, myStudents, "2 times a week")
            };
            Discipline CSharp = new Discipline("C#", 10, myStudents, "once a week");

            CSharp.AddStudent(new Student("Koko", 253789, "excellent at programming"));
            myDisciplines.Add(CSharp);

            //foreach (var discipline in myDisciplines)
            //{
            //    Console.WriteLine(discipline);
            //}


            List <Teacher> myTeachers = new List <Teacher>
            {
                new Teacher("G.Kolev", myDisciplines),
                new Teacher("S.Nakov", myDisciplines, "CSharp professional"),
                new Teacher("M.Peshev", myDisciplines, "PHP professional")
            };

            //foreach (var teacher in myTeachers)
            //{
            //    Console.WriteLine(teacher);
            //}

            Class myClass = new Class("7-B", myTeachers, "Back-end development class");

            Console.WriteLine(myClass);
        }
Ejemplo n.º 4
0
        static void Main()
        {
            List <Student> myStudents = new List <Student>
            {
                new Student("Muhammad", 640927, "excellent at hystory"),
                new Student("Ismail", 645820),
                new Student("Mail", 340981, "very badly behave yourself")
            };
            Student Agustus      = new Student("Agustus", 123456, "very good at math");
            Student Colomonimbus = new Student("Colomonimbus", 356272);

            myStudents.Add(Agustus);
            myStudents.Add(Colomonimbus);

            //foreach (var student in myClass)
            //{
            //    Console.WriteLine(student);
            //}

            List <Discipline> myDisciplines = new List <Discipline>
            {
                new Discipline("Python", 10, myStudents, "3 times a week"),
                new Discipline("Swift", 8, myStudents),
                new Discipline("Ruby", 12, myStudents, "2 times a week")
            };
            Discipline CSharp = new Discipline("C#", 10, myStudents, "once a week");

            CSharp.AddStudent(new Student("Koko", 253789, "excellent at programming"));
            myDisciplines.Add(CSharp);

            //foreach (var discipline in myDisciplines)
            //{
            //    Console.WriteLine(discipline);
            //}


            List <Teacher> myTeachers = new List <Teacher>
            {
                new Teacher("Akhmad", myDisciplines),
                new Teacher("Wibisono", myDisciplines, "CSharp professional"),
                new Teacher("Khaleed", myDisciplines, "PHP professional")
            };

            //foreach (var teacher in myTeachers)
            //{
            //    Console.WriteLine(teacher);
            //}

            Class myClass = new Class("7-B", myTeachers, "Back-end development class");

            Console.WriteLine(myClass);
        }
Ejemplo n.º 5
0
        public static void Main()
        {
            Student st1 = new Student("Pesho", "0102030405");
            Student st2 = new Student("Kiro", "0102020304");
            Student st3 = new Student("Penka", "0102020304");

            st1.Details = "Golem pich";
            Console.WriteLine(st1);
            Console.WriteLine();

            Discipline oop = new Discipline("OOP", 12);
            oop.AddStudent(st1);
            oop.AddStudent(st2);
            oop.Students.Add(st3); //will not work - you have to use the method AddStudent

            Discipline java = new Discipline("Java", 6);
            java.AddStudent(st3);

            //Console.WriteLine(st1.Details);
            Console.WriteLine(oop);
            Console.WriteLine(java);
            Console.WriteLine();

            Teacher t1 = new Teacher("Bai Ivan");
            t1.AddDiscipline(oop);
            t1.AddDiscipline(java);
            t1.Details = "Naj-dobriq daskal!";

            Console.WriteLine(t1);
            Console.WriteLine();

            Class cl1 = new Class("Alpha");
            cl1.AddTeacher(t1);
            cl1.AddStudent(st1);
            cl1.AddStudent(st2);
            cl1.AddStudent(st3);

            Console.WriteLine(cl1);
        }