internal static void Main() { var firstStudent = new Student("Gosho", "Goshov", 1234); var secondStudent = new Student("Ivan", "Ivanov", 123456); var thirdStudent = new Student("Pesho", "Peshov", 12345678); var firstDiscipline = new Disciplines("Math", 12, 36); var secondDiscipline = new Disciplines("English", 28, 56); var thirdDiscipline = new Disciplines("Biology", 4, 12); var firstTeacher = new Teacher("Ginka", "Ginkova"); var secondTeacher = new Teacher("Manol", "Manolov"); var thirdTeacher = new Teacher("Grisho", "Grishov"); var firstClass = new Class("XII A"); var secondClass = new Class("VI B"); var thirdClass = new Class("III D"); firstTeacher.AddDiscipline(firstDiscipline); firstTeacher.AddDiscipline(secondDiscipline); firstTeacher.AddDiscipline(thirdDiscipline); firstClass.AddStudent(firstStudent); firstClass.AddTeacher(firstTeacher); //Prints// firstStudent.Print(); firstDiscipline.Print(); firstTeacher.Print(); firstClass.Print(); }
static void Main() { Disciplines newDiscipline = new Disciplines("Mathematics", 50, 20); Students newStudent = new Students("Nikolay", Guid.NewGuid()); Teachers newTeacher = new Teachers("Ivan Ivanov"); newTeacher.AddDiscipline(newDiscipline); Console.WriteLine(newDiscipline.ToString()); Console.WriteLine(newStudent.ToString()); Console.WriteLine(newTeacher.ToString()); Console.WriteLine(newTeacher.GetComment()); }
static void Main(string[] args) { var student1 = new Student("Ivan Ivanov", 2); var student2 = new Student("Pesho Georgiev", 3); var student3 = new Student("Stamat Haralampiev", 2); var student4 = new Student("Strahil Ivanov", 3); var math = new Disciplines("Mathematics", 10, 24); var library = new Disciplines("Library", 15, 30); var csharp = new Disciplines("CSharp", 20, 40); var javascript = new Disciplines("JavaScript", 22, 42); var teacher1 = new Teacher("Ginka Petkova", new List <Disciplines> { math, library }); var teacher2 = new Teacher("Georgi Georgiev", new List <Disciplines> { csharp, javascript }); var class1 = new Class("Class1", new List <Student> { student1, student2 }, new List <Teacher> { teacher1, teacher2 }); var class2 = new Class("Class2", new List <Student> { student3, student4 }, new List <Teacher> { teacher1, teacher2 }); var school = new School("Telerik Academy", new List <Class> { class1, class2 }); class2.AddComment("Important"); school.AddClass(class1); teacher1.AddComment("Hello"); class1.AddStudent(new Student("Hristo Popov", 4)); class1.AddTeacher(new Teacher("Stanka Draganova", new List <Disciplines> { math, csharp })); teacher1.AddDiscipline(new Disciplines("Biology", 15, 25)); math.AddComment("This is very important"); student1.AddComment("Hello"); Console.WriteLine(math.ToString()); }
static void Main(string[] args) { Student s1 = new Student("Popescu I", "2B", "Present"); Student s2 = new Student("Dolanescu G", "3A", "Present"); Student s3 = new Student("Gigi A", "2B", "Absent"); Student s4 = new Student("Aionei F", "3A", "Present"); Disciplines d1 = new Disciplines("Mathematics", 10, 30); Disciplines d2 = new Disciplines("French", 6, 10); Disciplines d3 = new Disciplines("Physics", 15, 9); Disciplines d4 = new Disciplines("Nature science", 12, 20); Teacher t1 = new Teacher("First Teacher"); t1.AddDiscipline(d1); t1.AddDiscipline(d3); Teacher t2 = new Teacher("Second Teacher"); t2.AddDiscipline(d2); t2.AddDiscipline(d4); Class c1 = new Class("3A"); c1.AddTeacher(t1); c1.AddStudent(s2); c1.AddStudent(s4); Class c2 = new Class("2B"); c2.AddTeacher(t2); c2.AddStudent(s1); c2.AddStudent(s3); School s = new School("Ion Creanga", "Iasi"); s.AddClass(c1); s.AddClass(c2); s.Print(); Console.ReadKey(); }
public void RemoveDiscipline(Disciplines d) { DisciplinesOfTeacher.Remove(d); }
public void AddDiscipline(Disciplines d) { DisciplinesOfTeacher.Add(d); }
static void Main() { var studentOne = new Student("Goshko"); var studentTwo = new Student("Pencho"); var studentThree = new Student("Stamat"); var studentFour = new Student("Toshko"); var studentFive = new Student("Gincho"); var teacherOne = new Teacher("Alex"); var teacherTwo = new Teacher("Vic"); var teacherThree = new Teacher("Ste3v"); var disciplineOne = new Disciplines("Math", 6, 12); var disciplineTwo = new Disciplines("c#", 8, 16); var disciplineThree = new Disciplines("JS", 2, 4); teacherOne.AddDiscipline(disciplineOne); teacherOne.AddDiscipline(disciplineTwo); teacherTwo.AddDiscipline(disciplineTwo); teacherOne.AddDiscipline(disciplineThree); teacherThree.AddDiscipline(disciplineOne); teacherThree.AddDiscipline(disciplineThree); var myClass = new Class("The most awesome class"); myClass.AddStudent(studentOne); myClass.AddStudent(studentTwo); myClass.AddStudent(studentThree); myClass.AddStudent(studentFour); myClass.AddStudent(studentFive); myClass.AddTeacher(teacherOne); myClass.AddTeacher(teacherTwo); myClass.AddTeacher(teacherThree); var mySchool = new School(); mySchool.AddClass(myClass); Console.WriteLine($"My School has a class: {myClass.TextID}"); Console.WriteLine("The teachers in the class are:"); foreach (var teacher in myClass.Teachers) { Console.WriteLine($"\t{teacher.Name} and he teaches:"); foreach (var discipline in teacher.Disciplines) { Console.WriteLine($"\t\t{discipline.Name} with {discipline.NumExercises} exercises and {discipline.NumLectures} lectures"); } } Console.WriteLine("The students in the class are:"); foreach (var student in myClass.Students) { Console.WriteLine($"\t{student.Name} with unique ID: {student.ClassNum}"); } studentOne.AddComment("STUDENT ONE COMMENT"); Console.WriteLine($"Student comment: {string.Join(", ", studentOne.MyComments)}"); myClass.AddComment("CLASS COMMENT"); Console.WriteLine($"Class comment: {string.Join(", ", myClass.MyComments)}"); teacherOne.AddComment("TEACHER ONE COMMENT"); Console.WriteLine($"Teacher comment: {string.Join(", ", teacherOne.MyComments)}"); disciplineOne.AddComment("DISCIPLINE ONE COMMENT"); Console.WriteLine($"Discipline comment: {string.Join(", ", disciplineOne.MyComments)}"); }
public void RemoveDiscipline(Disciplines discipline) { this.Disciplines.Remove(discipline); }
public void AddDiscipline(Disciplines discipline) { this.Disciplines.Add(discipline); }
public void AddDiscipline(Discipline discipline) { Disciplines.Add(discipline); }
public void RemoveDiscipline(Disciplines discipline) { this.disciplinesList.Remove(discipline); }
public void AddDiscipline(Disciplines discipline) { this.disciplinesList.Add(discipline); }