Esempio n. 1
0
        static void Main()
        {
            Disciplines History = new Disciplines("History", 5, 5);
            Disciplines English = new Disciplines("English", 10, 4);
            Disciplines Math    = new Disciplines("Math", 11, 3);
            Disciplines Biology = new Disciplines("Biology", 3, 5);

            Teachers penka = new Teachers("Penka");

            penka.disciplines.Add(History);
            penka.disciplines.Add(Math);
            Teachers dzurla = new Teachers("Dzurla");

            dzurla.disciplines.Add(Biology);
            dzurla.disciplines.Add(English);
            Teachers valq = new Teachers("Valq");

            valq.disciplines.Add(History);
            valq.disciplines.Add(English);

            Classes classA = new Classes("A");

            classA.teachers.Add(penka);
            classA.teachers.Add(valq);
            classA.students.Add(new Students("Pesho Iliev", "2345"));
            classA.students.Add(new Students("Gosho Chumata", "13"));
            classA.students.Add(new Students("Dzurlio Dzurlev", "412"));
            classA.students.Add(new Students("Ganka Shikerova", "4124"));
            classA.students.Add(new Students("Petur Petrov", "4124"));
            Console.WriteLine(classA.ToString());
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            Student first=new Student("Mariq","564710");
            Student second = new Student("Pesho", "111123", "Gouem pich");
            Student third = new Student("Ganka", "126578");
            Disciplines basic = new Disciplines(10, "C# programming", "This is the prepration level at SoftUni.");
            Disciplines intermediate = new Disciplines(20, "Object Oriented Programming");
            Disciplines advanced = new Disciplines(30, "Structures of data and Algorithms", "This is the third level in SoftUni.");
            List<Student> students = new List<Student>();
            students.Add(first);
            students.Add(second);
            students.Add(third);

            List<Disciplines>SetOne=new List<Disciplines>();
            SetOne.Add(intermediate);
            SetOne.Add(intermediate);
            SetOne.Add(advanced);
            Teacher Nakov = new Teacher("Nakov", SetOne, "Gouem pich too :)");
            Teacher Znaiko = new Teacher("Znaiko", SetOne);
            List<Teacher> teachers = new List<Teacher>();
            teachers.Add(Nakov);
            teachers.Add(Znaiko);
            Class begginers = new Class(teachers,students);
            
        }
Esempio n. 3
0
        static void Main(string[] args)
        {
            Disciplines d1 = new Disciplines("Geo", 3, 5);
            Disciplines d2 = new Disciplines("Mate", 6, 7);
            Disciplines d3 = new Disciplines("Rom", 5, 3);
            Disciplines d4 = new Disciplines("Bio", 8, 9);
            Teachers    t1 = new Teachers("Asd", "Mna");
            Teachers    t2 = new Teachers("Lfs", "Gfr");

            t1.AddDisciplines(d1);
            t1.AddDisciplines(d2);
            t2.AddDisciplines(d3);
            t2.AddDisciplines(d3);
            Student s1 = new Student("Poi", "Mhj");
            Student s2 = new Student("Lkj", "Iuy");
            Student s3 = new Student("Wio", "Qop");
            Clasa   c1 = new Clasa("12A");

            c1.AddProf(t1);
            c1.AddProf(t2);
            c1.AddStud(s1);
            c1.AddStud(s2);
            c1.AddStud(s3);
            c1.Print();
            Console.ReadLine();
        }
Esempio n. 4
0
        public static void Main()
        {
            Students jon = new Students("Jon");
            jon.Comment = "something";
            Console.WriteLine(jon.UniqueClassNr);

            Students mike = new Students("Mike");
            Console.WriteLine(mike.UniqueClassNr);

            Disciplines math = new Disciplines("Mathematics", 4, 2);
            math.Comment = "something";

            ////number of lectures and exercises should be changeble
            math.NumberOfLectures++;
            Console.WriteLine(math.NumberOfLectures);

            Disciplines english = new Disciplines("English", 4, 8);

            Teachers jonWu = new Teachers("Jon Wu");
            jonWu.Comment = "very clever man";
            jonWu.AddDiscipline(math);
            Teachers nutProfesor = new Teachers("Crazy Prof.", english, math);

            Classes alfa = new Classes("alfa");
            Classes beta = new Classes("beta", jonWu, nutProfesor);
            Classes omega = new Classes("omega", jon);
            alfa.AddTeacher(nutProfesor);
            alfa.AddStudent(jon);
        }
Esempio n. 5
0
        static void Main()
        {
            var disciplineOne   = new Disciplines("Math", 4, 4);
            var disciplineTwo   = new Disciplines("Literature", 5, 5);
            var disciplineThree = new Disciplines("History", 6, 6);
            var teacherOne      = new Teacher("Gosho");
            var teacherTwo      = new Teacher("Gosho2");
            var teacherThree    = new Teacher("Gosho3");

            teacherOne.AddDiscipline(disciplineOne);
            teacherOne.AddDiscipline(disciplineTwo);
            teacherTwo.AddDiscipline(disciplineThree);
            teacherThree.AddDiscipline(disciplineOne);
            teacherThree.AddDiscipline(disciplineThree);
            var studentOne   = new Student("tosho");
            var studentTwo   = new Student("penka");
            var studentThree = new Student("stamat");
            var myClass      = new Class("The mad class");

            myClass.AddStudent(studentOne);
            myClass.AddStudent(studentTwo);
            myClass.AddStudent(studentThree);
            myClass.AddTeacher(teacherOne);
            myClass.AddTeacher(teacherTwo);
            myClass.AddTeacher(teacherThree);

            myClass.PrintInfo();
        }
Esempio n. 6
0
        static void Main()
        {
            Disciplines History = new Disciplines("History", 5, 5);
            Disciplines English = new Disciplines("English", 10, 4);
            Disciplines Math = new Disciplines("Math", 11, 3);
            Disciplines Biology = new Disciplines("Biology", 3, 5);

            Teachers penka = new Teachers("Penka");
            penka.disciplines.Add(History);
            penka.disciplines.Add(Math);
            Teachers dzurla = new Teachers("Dzurla");
            dzurla.disciplines.Add(Biology);
            dzurla.disciplines.Add(English);
            Teachers valq = new Teachers("Valq");
            valq.disciplines.Add(History);
            valq.disciplines.Add(English);

            Classes classA = new Classes("A");
            classA.teachers.Add(penka);
            classA.teachers.Add(valq);
            classA.students.Add(new Students("Pesho Iliev", "2345"));
            classA.students.Add(new Students("Gosho Chumata", "13"));
            classA.students.Add(new Students("Dzurlio Dzurlev", "412"));
            classA.students.Add(new Students("Ganka Shikerova", "4124"));
            classA.students.Add(new Students("Petur Petrov", "4124"));
            Console.WriteLine(classA.ToString());
        }
Esempio n. 7
0
        static void Main(string[] args)
        {
            Student        first        = new Student("Mariq", "564710");
            Student        second       = new Student("Pesho", "111123", "Gouem pich");
            Student        third        = new Student("Ganka", "126578");
            Disciplines    basic        = new Disciplines(10, "C# programming", "This is the prepration level at SoftUni.");
            Disciplines    intermediate = new Disciplines(20, "Object Oriented Programming");
            Disciplines    advanced     = new Disciplines(30, "Structures of data and Algorithms", "This is the third level in SoftUni.");
            List <Student> students     = new List <Student>();

            students.Add(first);
            students.Add(second);
            students.Add(third);

            List <Disciplines> SetOne = new List <Disciplines>();

            SetOne.Add(intermediate);
            SetOne.Add(intermediate);
            SetOne.Add(advanced);
            Teacher        Nakov    = new Teacher("Nakov", SetOne, "Gouem pich too :)");
            Teacher        Znaiko   = new Teacher("Znaiko", SetOne);
            List <Teacher> teachers = new List <Teacher>();

            teachers.Add(Nakov);
            teachers.Add(Znaiko);
            Class begginers = new Class(teachers, students);
        }
Esempio n. 8
0
 //class's constructor
 public Discipline(Disciplines name, int numberOfLectures, int numberOfExercises)
 {
     this.name = name;
     this.numberOfLectures = numberOfLectures;
     this.numberOfExercises = numberOfExercises;
     if (this.numberOfExercises <= 0 || this.numberOfLectures <= 0)
         throw new ArgumentException("Discipline mismatch");
 }
Esempio n. 9
0
File: Main.cs Progetto: albundee/OOP
        public static void Main()
        {
            School notes = new School("something");

            Console.WriteLine(notes);
            School nullnotes = new School("");

            Console.WriteLine(nullnotes);
            Student        pesho        = new Student("Pesho", 11, "studentdetails");
            Student        misho        = new Student("Misho", 15, null);
            List <Student> liststudents = new List <Student>()
            {
                pesho, misho
            };

            Console.WriteLine(pesho.Name);
            Console.WriteLine(pesho.Classnumber);
            Console.WriteLine(pesho.details);
            Console.WriteLine(misho.Name);
            Disciplines math    = new Disciplines("Mathematics", 15, liststudents, "mathnotes");
            Disciplines phisics = new Disciplines("Phisics", 10, liststudents, null);

            Console.WriteLine(math.Name);
            Console.WriteLine(math.Numberoflectures);
            Console.WriteLine(math.details);
            Console.WriteLine(phisics.Name);
            People people = new People("Ivan", "peopledetails");

            Console.WriteLine(people.Name);
            List <Disciplines> listdisciplines = new List <Disciplines>()
            {
                math, phisics
            };
            Teacher        ii           = new Teacher("Ivan Ivanov", listdisciplines, "teacherdetails");
            Teacher        dd           = new Teacher("Dim Dimitrov", listdisciplines, null);
            List <Teacher> listteachers = new List <Teacher>()
            {
                ii, dd
            };

            Console.WriteLine(ii.Name);
            Console.WriteLine(ii.Disciplines);
            Console.WriteLine(ii.details);
            Console.WriteLine(dd.Name);
            Class aclass = new Class("A", listteachers, liststudents, "classnotes");

            Console.WriteLine(aclass.Identifier);
            Console.WriteLine(listteachers);
            Console.WriteLine(liststudents);
            Console.WriteLine(aclass.details);
        }
Esempio n. 10
0
        static void Main(string[] args)
        {
            School someSchool = new School("Ivan Vazov");

            ClassOfStudents _8b = new ClassOfStudents("8 B");

            Students ivan  = new Students("Ivan", 10);
            Students mitko = new Students("Mitko", 15);
            Students petko = new Students("Petko", 20);

            _8b.AddStudent(ivan);
            _8b.AddStudent(mitko);
            _8b.AddStudent(petko);

            ivan.AddComment("Iskam 6 !");


            Disciplines literature = new Disciplines("Literature", 20, 10);
            Disciplines journalism = new Disciplines("Journalism", 30, 40);


            Teachers vuchkov = new Teachers("Profesor Vuchkov");

            vuchkov.AddComment("Gledam i ne vqrvam na ushite si !");
            vuchkov.AddDiscipline(literature);
            vuchkov.AddDiscipline(journalism);

            _8b.AddTeacher(vuchkov);

            someSchool.AddClass(_8b);

            Console.WriteLine("Class number of {0} is : {1}", petko.Name, petko.ClassNumber);

            foreach (var item in vuchkov.OptionalComments)
            {
                Console.WriteLine("Professor Vuchkov declared : {0}", item);
            }

            Console.WriteLine();
            Console.WriteLine("He teaches the following disciplines : ");
            foreach (var item in vuchkov.Disciplines)
            {
                Console.WriteLine(item.NameOfLecture);
            }
        }
        public static void Main()
        {
            Students anna  = new Students("Anna", 201122345, "Age 19");
            Students gosho = new Students("Gosho", 123456789);
            Students petko = new Students("Petko", 201122380);


            Disciplines maths = new Disciplines("Mathematics", 4, new List <Students>()
            {
                anna, gosho, petko
            });
            Disciplines litterature = new Disciplines("Litterature", 5, new List <Students>()
            {
                gosho, petko
            });

            Teachers petrova = new Teachers("Petrova", new List <Disciplines>()
            {
                litterature
            });
            Teachers ivanov = new Teachers("Ivanov", new List <Disciplines>()
            {
                maths, litterature
            });

            Classes class2011 = new Classes("2011", new List <Students>()
            {
                anna, gosho
            }, new List <Teachers>()
            {
                petrova
            });


            Classes class1213 = new Classes("1213", new List <Students>()
            {
                petko, gosho
            }, new List <Teachers>()
            {
                ivanov
            });
        }
Esempio n. 12
0
        static void Main()
        {
            var student = new Student("Pesho", 11);

            Console.WriteLine(student.Name);
            Disciplines[] disciplines = new Disciplines[]
            {
                new Disciplines("Math", 12, 3),
                new Disciplines("English", 13, 5)
            };
            var teacher = new Teacher("Koicheva", disciplines);

            teacher.Comment("asdas");
            Console.WriteLine(teacher.Name);
            for (int i = 0; i < teacher.Disciplines.Count(); i++)
            {
                Console.WriteLine(teacher.Disciplines[i].Name);
                Console.WriteLine(teacher.Disciplines[i].NumberOfExcercises);
                Console.WriteLine(teacher.Disciplines[i].NumberOfLectures);
            }
        }
Esempio n. 13
0
        static void Main()
        {
            Student first = new Student("Gosho", "1");
            Student second = new Student("Ivan", "2");
            Student[] studentGroup = { first, second };
            Disciplines algebra = new Disciplines("Algebra", 5, 5);

            Teachers teacher = new Teachers("Kanev", new List<Disciplines> {algebra});
            Teachers[] teacherGroup = { teacher };
            Classes math = new Classes(studentGroup.ToList(), teacherGroup.ToList(), "Math Class");

            Console.Write("Class: ");
            Console.WriteLine(math.ID);
            Console.Write("Discipline: ");
            Console.WriteLine(algebra.Name);
            Console.Write("Teacher: ");
            Console.WriteLine(teacher.Name);
            Console.Write("Best student: ");
            Console.WriteLine(math.Students[0].Name);

            Console.WriteLine("\nComments: ");
            math.AddComment("algebra");
            math.AddComment("geometry");
            foreach (var item in math.Comments)
            {
                Console.WriteLine(item);
            }

            Console.WriteLine("\nAfter algebra is removed: ");
            math.RemoveComment("algebra");
            foreach (var item in math.Comments)
            {
                Console.WriteLine(item);
            }
            Console.WriteLine();
        }
Esempio n. 14
0
 public void AddDiscipline(Disciplines newDiscipline)
 {
     this.teachersDisciplines.Add(newDiscipline);
 }
Esempio n. 15
0
 public void RemoveDiscipline(Disciplines discipline)
 {
     this.teachersDisciplines.Remove(discipline);
 }
Esempio n. 16
0
 public void AddDisciplines(Disciplines d)
 {
     listaDisciplines.Add(d);
 }
Esempio n. 17
0
 //methods
 public void AddDiscipline(Disciplines discipline)
 {
     this.disciplines.Add(discipline);
 }
Esempio n. 18
0
 public void RemoveCourse(Disciplines oldCourse)
 {
     this.Courses.Remove(oldCourse);
 }
Esempio n. 19
0
 public void AddCourse(Disciplines newCourse)
 {
     this.Courses.Add(newCourse);
 }
Esempio n. 20
0
 public void RemoveDiscipline(Disciplines discipline)
 {
     this.disciplines.Remove(discipline);
 }
Esempio n. 21
0
 public void AddDiscipline(Disciplines discipline)
 {
     this.setOfDisciplines.Add(discipline);
 }
Esempio n. 22
0
 public void RemoveDiscipline(Disciplines discipline)
 {
     this.setOfDisciplines.Remove(discipline);
 }