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() { 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); }
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); }
static void Main() { Teacher teach = new Teacher("Zlatka", "Ivanova"); teach.AddDiscipline(new Disciplines("matematika", 1, 14)); //asign discipline to teacher teach.AddDiscipline(new Disciplines("Fizika", 2, 15)); Teacher teacherIvan = new Teacher("Ivan", "Ivanov", new Disciplines("Math", 5, 14)); teacherIvan.AddDiscipline(new Disciplines("Phisycs", 5, 15)); Students studentIvan = new Students("Pavel","Ivanov"); Students studentPeho = new Students("Petar", "Petrov"); Classes class1 = new Classes(teach, studentIvan, "46153689"); class1.AddStudent(studentPeho); Console.WriteLine(class1); Console.WriteLine("=========================================="); Console.WriteLine(teach); Console.WriteLine(teacherIvan); }
static void Main() { Student studentPetronka = new Student("Petronka", "Ivanova", 1); Student studentKaramfilka = new Student("Karamfilka", "Georgoeva", 2); Student studentIvan = new Student("Ivan", "Ivanov", 3); List <Student> studentsInClassA = new List <Student>(); studentsInClassA.Add(studentPetronka); studentsInClassA.Add(studentKaramfilka); studentsInClassA.Add(studentIvan); foreach (var st in studentsInClassA) { Console.WriteLine(st.ToString()); } Console.WriteLine(); Discipline math = new Discipline("Math", 10, 10); Discipline biology = new Discipline("Biology", 14, 14); Discipline physics = new Discipline("Physics", 12, 12); Teacher ivoHristov = new Teacher("Ivo", "Hristov"); ivoHristov.AddDiscipline(math); ivoHristov.AddDiscipline(physics); Teacher mariaPetrova = new Teacher("Maria", "Petrova"); mariaPetrova.AddDiscipline(biology); Class classA = new Class("10B"); classA.AddTeacher(ivoHristov); classA.AddComment("We are Class 10B."); }