public static void Main()
        {
            var school = new School();
            var newClass = new Class("3");
            school.AddClass(newClass);
            Console.WriteLine(newClass.Name);

            var someStudent = new Student("Pesho", "252525");
            var anotherStudent = new Student("Gosho", "252526");
            newClass.AddPeople(someStudent);
            newClass.AddPeople(anotherStudent);

            var someTeacher = new Teacher("Cura");
            newClass.AddPeople(someTeacher);

            var discipline = new Discipline("Mathematics", 10, 20);
            someTeacher.AddDiscipline(discipline);
            Console.WriteLine(discipline.Name);
            foreach (var person in newClass.People)
            {
                Console.WriteLine(person.Name);
            }

            someStudent.AddComment("Will you have a lecture tomorrow?");
            anotherStudent.AddComment("No, The teacher is ill!");

            Console.WriteLine("Student: {0}\nUnique Number: {1}", someStudent.Name, someStudent.UniqueClassNumber);
            foreach (var comment in someStudent.Comments)
            {
                Console.WriteLine("Comments: {0}", comment);
            }
            someStudent.RemoveComment("Will you have a lecture tomorrow?");
        }
 static void Main(string[] args)
 {
     Student peshoStudent = new Student("Petar Petrov", 17);
     Student goshoStudent = new Student("Georgi Georgiev", 5);
     Student mimiStudent = new Student("Maria Petrova", 12);
     Student geriStudent = new Student("Gergana Georgieva", 7);
     Student ivanStudent = new Student("Ivan Ivanov", 10);
     ivanStudent.AddComment("Nevertheless...");
     Discipline maths = new Discipline("Mathematics", 3, 3);
     Discipline phy = new Discipline("Physics", 2, 2);
     Discipline info = new Discipline("Informatics", 2, 2);
     Discipline chem = new Discipline("Chemistry", 1, 1);
     Discipline eng = new Discipline("English", 2, 2);
     Teacher haralampiTeacher = new Teacher("Haralampi Haralampiev", new List<Discipline> { maths, info });
     Teacher gospodinTeacher = new Teacher("Gospodin Gospodinov", new List<Discipline> { eng, maths });
     Teacher dimoTeacher = new Teacher("Dimo Dimov", new List<Discipline> { phy, chem });
     Class elevenA = new Class("11A", new List<Teacher>{gospodinTeacher, dimoTeacher});
     Class elevenB = new Class("11B", new List<Teacher>{haralampiTeacher, dimoTeacher});
     School ourSchool = new School(new List<Class>{ elevenA, elevenB });
     Console.WriteLine(ivanStudent);
     ivanStudent.PrintComment();
     Console.WriteLine(dimoTeacher);
     Console.WriteLine(elevenA);
     Console.WriteLine(ourSchool);
 }
예제 #3
0
        static void Main()
        {
            Student student = new Student("John Doe", 4);

            Console.WriteLine(student);

            Teacher teacher = new Teacher("Jeff Black", new Discipline("Chemistry",10,20),new Discipline("Physics",15,25));

            Console.WriteLine(teacher);

            School school = new School(new SchoolClass("12b", teacher));
        }
예제 #4
0
        static void Main()
        {
            School oldSchool = new School("How High Highscool");

            Class classOne = new Class("A1");
            Class classTwo = new Class("A2");
            Class classThree = new Class("B1");

            Teacher teacherOne = new Teacher("Gerasim", "an old ba*tard!");
            Teacher teacherTwo = new Teacher("Gerasimov");

            Student studentOne = new Student("Ivan", "123456", "ladies type");
            Student studentTwo = new Student("Petkan", "123457", "zubar1");
            Student studentThree = new Student("Gosho", "123458");
            Student studentFour = new Student("Krasimir", "123459", "pich");
            Student studentFive = new Student("Ivan", "0000001");

            Discipline chovekIPriroda = new Discipline("CIP", 5, 10);
            Discipline history = new Discipline("History", 3, 6, "...the story of it all ");
            Discipline geography = new Discipline("Geography", 3, 6);
            Discipline literature = new Discipline("Literature", 2, 4, "Russian classics basically");

            oldSchool.AddClass(classOne);
            oldSchool.AddClass(classTwo);
            oldSchool.AddClass(classThree);

            teacherOne.AddDiscipline(chovekIPriroda);
            teacherOne.AddDiscipline(literature);
            teacherTwo.AddDiscipline(history);
            teacherTwo.AddDiscipline(geography);

            classOne.AddStudentToAClass(studentOne);
            classOne.AddStudentToAClass(studentTwo);
            classTwo.AddStudentToAClass(studentThree);
            classThree.AddStudentToAClass(studentFour);
            classThree.AddStudentToAClass(studentFive);

            classOne.AddTeacherToAClass(teacherOne);
            classOne.AddTeacherToAClass(teacherTwo);
            classTwo.AddTeacherToAClass(teacherOne);
            classThree.AddTeacherToAClass(teacherTwo);

            Console.WriteLine("The school {0} has {1} the fololing classes: \n\n {2} {3} {4}", oldSchool.Name, oldSchool.Classes.Count, classOne, classTwo, classThree);
        }
예제 #5
0
        static void Main()
        {
            // Creating school
            School telerik = new School("Telerik Academy");

            // Creating disciplines
            Disciplines csharp1 = new Disciplines("C# part 1: ", 7, 10);
            Disciplines csharp2 = new Disciplines("C# part 2: ", 8, 10);
            Disciplines csharpOOP = new Disciplines("C# OOP: ", 6, 10);
            Disciplines csharpHQC = new Disciplines("C# High-Quality Code: ", 20, 40);
            Disciplines csharDSA = new Disciplines("C# Data Structures and Algorithms: ", 15, 25);

            telerik.AddDisciplines(csharp1);

            // Creating teachers
            Teachers doncho = new Teachers("Doncho Minkov");
            Teachers niki = new Teachers("Nikolay Kostov");

            // telerik.AddTeachers(doncho);
            // doncho.AddDisciplines(csharp1);

            List<Teachers> cSharpTeachers = new List<Teachers>() {doncho, niki};

            Classes first = new Classes("First Group");
            Classes second = new Classes("Second Group");

            // telerik.AddClasses(first);
            // first.AddTeachers(doncho);

            // Creating students
            Students vili = new Students("Vili", 1);
            Students kris = new Students("Kristian", 2);
            Students mitko = new Students("Dimitar", 3);
            Students gosho = new Students("Georgi", 4);

            // Add comment
            vili.AddComment("kris");
            vili.PrintComment();

            Console.WriteLine(telerik);
        }
        public static void Main()
        {
            School someSchool = new School("School");
            Console.WriteLine("School name: \"{0}\"\n", someSchool.NameOfSchool);

            var listOfStudents = new List<Student>()
            {
                new Student ("Angel Geshev", "Class A"),
                new Student ("Deqn Balev", "Class A"),
                new Student ("Angel Marinov", "Class A"),
                new Student ("Boris Voinikov", "Class A"),
                new Student ("Galin Ivanov", "Class B"),
                new Student ("Zasmqn Zasmqnov", "Class B"),
                new Student ("Iglika Cvetanova", "Class B"),
                new Student ("Minka Breznikova", "Class B"),
                new Student ("Mariq Aleksandrova", "Class B")
            };

            Console.WriteLine("\nList of students:\n");

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

            List<Student> studentsInClassA = new List<Student>();
            studentsInClassA.Add(listOfStudents[0]);
            studentsInClassA.Add(listOfStudents[1]);
            studentsInClassA.Add(listOfStudents[2]);
            studentsInClassA.Add(listOfStudents[3]);

            List<Student> studentsInClassB = new List<Student>();
            studentsInClassB.Add(listOfStudents[4]);
            studentsInClassB.Add(listOfStudents[5]);
            studentsInClassB.Add(listOfStudents[6]);
            studentsInClassB.Add(listOfStudents[7]);
            studentsInClassB.Add(listOfStudents[8]);

            Discipline math = new Discipline("Math", 10, 10);
            Discipline bulgarianLanguage = new Discipline("Bulgarian language", 20, 15);
            Discipline sport = new Discipline("Sport", 5, 5);
            Discipline physics = new Discipline("Physics", 5, 5);
            Discipline biology = new Discipline("Biology", 10, 10);

            Teacher mitkoKolev = new Teacher("Mitko Kolev");
            mitkoKolev.Disciplines.Add(math);
            mitkoKolev.Disciplines.Add(physics);

            Teacher elenaGeorgieva = new Teacher("Elena Georgieva");
            elenaGeorgieva.Disciplines.Add(bulgarianLanguage);

            Teacher stamatStamatov = new Teacher("Stamat Stamatov");
            stamatStamatov.Disciplines.Add(biology);
            stamatStamatov.Disciplines.Add(sport);

            List<Teacher> teachersForAClass = new List<Teacher>() { mitkoKolev, stamatStamatov };
            List<Teacher> teachersForBClass = new List<Teacher>() { elenaGeorgieva, mitkoKolev };

            Console.WriteLine("\nList of teachers:\n");

            foreach (Teacher teacher in teachersForAClass)
            {
                Console.WriteLine("{0} {1}", teacher.Name, string.Join("\n", teacher.Disciplines));
                Console.WriteLine();
            }

            Classes classA = new Classes("Class A", studentsInClassA);
            classA.Teachers = teachersForAClass;

            Classes classB = new Classes("Class B", studentsInClassB);
            classB.Teachers = teachersForBClass;

            Console.Write("\nClass: ");
            Console.WriteLine(classA);

            Console.Write("\nClass: ");
            Console.WriteLine(classB);

            classA.AddComment("Hi!");
            classA.AddComment("Bye!");
        }