public static void Run() { Student aniPetrova = new Student("Ani", " Petrova", 1); Student gerogiMalinov = new Student("Gerogi", " Malinov", 2); Student hristoVasilev = new Student("Hristo ", "Vasilev", 3); List <Student> studentsInClassA = new List <Student>(); studentsInClassA.Add(aniPetrova); studentsInClassA.Add(gerogiMalinov); studentsInClassA.Add(hristoVasilev); Console.ForegroundColor = ConsoleColor.Green; Console.WriteLine("School Classes Tests"); Console.ForegroundColor = ConsoleColor.White; foreach (var student in studentsInClassA) { Console.WriteLine(student.ToString()); } Console.WriteLine(); Discipline math = new Discipline("Math", 10, 10); Discipline language = new Discipline("Language", 20, 10); Discipline art = new Discipline("Art", 5, 10); Teacher petarPetrov = new Teacher("Petar", " Petrov"); petarPetrov.AddDiscipline(math); petarPetrov.AddDiscipline(language); Teacher peshoPeshov = new Teacher("Pesho", "Peshov"); peshoPeshov.AddDiscipline(art); List <Teacher> teachersForAClass = new List <Teacher>() { petarPetrov, peshoPeshov }; Class classA = new Class("5A"); classA.AddTeacher(petarPetrov); classA.AddTeacher(peshoPeshov); Console.WriteLine(classA.ToString() + "\n" + string.Join(", ", classA.Teachers)); Console.WriteLine(); // classA.AddComment("Hello"); /// uncoment to Thro exception classA.AddComment("Welcome! This is our first class."); classA.AddComment("This is our last class! Good Bye!"); }
static void Main() { Discipline historyOfFilm = new Discipline("History of Film", 10, 15); historyOfFilm.AddComment(@"Learn the history of film"); Discipline filmDirecting = new Discipline("Film Directing",15,20); filmDirecting.AddComment(@"Learn fundamentals of film directing"); Teacher pedro = new Teacher("Pedro", "Almodovar", new [] { historyOfFilm, filmDirecting }); Class newClass = new Class("8B", pedro); newClass.AddComment("Otlichnici"); Console.WriteLine(newClass.ToString()); Console.WriteLine("Students:"); Student gosho = new Student("Gosho", "Goshev", 1); Console.WriteLine(gosho); }
static void Main() { Student peshoPeshov = new Student("Pesho", "Peshov", 1); Student iliqPetkov = new Student("Iliq", "Petkov", 2); Student ivanDraganov = new Student("Ivan", "Draganov", 3); List <Student> studentsInClassA = new List <Student>(); studentsInClassA.Add(peshoPeshov); studentsInClassA.Add(iliqPetkov); studentsInClassA.Add(ivanDraganov); foreach (var student in studentsInClassA) { Console.WriteLine(student.ToString()); } Console.WriteLine(); Discipline math = new Discipline("Math", 10, 10); Discipline language = new Discipline("Language", 20, 10); Discipline art = new Discipline("Art", 5, 10); Teacher dinkoPetrov = new Teacher("Dinko", "Petrov"); dinkoPetrov.AddDiscipline(math); dinkoPetrov.AddDiscipline(language); Teacher penkaHubavenkova = new Teacher("Penka", "Hubavenkova"); penkaHubavenkova.AddDiscipline(art); List <Teacher> teachersForAClass = new List <Teacher>() { dinkoPetrov, penkaHubavenkova }; Class classA = new Class("10A"); classA.AddTeacher(dinkoPetrov); classA.AddTeacher(penkaHubavenkova); Console.WriteLine(classA.ToString() + "\n" + string.Join(", ", classA.Teachers)); }
static void Main() { Student aniPetrova = new Student("Ani"," Petrova", 1); Student gerogiMalinov = new Student("Gerogi"," Malinov",2); Student hristoVasilev = new Student("Hristo ","Vasilev",3); List<Student> studentsInClassA = new List<Student>(); studentsInClassA.Add(aniPetrova); studentsInClassA.Add(gerogiMalinov); studentsInClassA.Add(hristoVasilev); foreach (var student in studentsInClassA) { Console.WriteLine(student.ToString()); } Console.WriteLine(); Discipline math = new Discipline("Math", 10, 10); Discipline language = new Discipline("Language", 20, 10); Discipline art = new Discipline("Art", 5, 10); Teacher petarPetrov = new Teacher("Petar"," Petrov"); petarPetrov.AddDiscipline (math); petarPetrov.AddDiscipline(language); Teacher peshoPeshov = new Teacher("Pesho" ,"Peshov"); peshoPeshov.AddDiscipline(art); List<Teacher> teachersForAClass = new List<Teacher>() { petarPetrov, peshoPeshov }; Class classA = new Class("5A"); classA.AddTeacher(petarPetrov); classA.AddTeacher(peshoPeshov); Console.WriteLine(classA.ToString() + "\n" + string.Join("", classA.TeachersSet)); classA.AddComment("Hello"); classA.AddComment("This is our first class."); classA.AddComment("This is our last class!"); }
static void Main() { Discipline historyOfFilm = new Discipline("History of Film", 10, 15); historyOfFilm.AddComment(@"Learn the history of film"); Discipline filmDirecting = new Discipline("Film Directing", 15, 20); filmDirecting.AddComment(@"Learn fundamentals of film directing"); Teacher pedro = new Teacher("Pedro", "Almodovar", new [] { historyOfFilm, filmDirecting }); Class newClass = new Class("8B", pedro); newClass.AddComment("Otlichnici"); Console.WriteLine(newClass.ToString()); Console.WriteLine("Students:"); Student gosho = new Student("Gosho", "Goshev", 1); Console.WriteLine(gosho); }