static void Main() { LocalCourse localCourse = new LocalCourse("Databases"); Console.WriteLine(localCourse.ToString()); localCourse.Lab = "Enterprise"; Console.WriteLine(localCourse.ToString()); localCourse.Students = new List <string>() { "Peter", "Maria" }; Console.WriteLine(localCourse.ToString()); localCourse.TeacherName = "Svetlin Nakov"; localCourse.Students.Add("Milena"); localCourse.Students.Add("Todor"); Console.WriteLine(localCourse.ToString()); OffsiteCourse offsiteCourse = new OffsiteCourse( "PHP and WordPress Development", "Mario Peshev", new List <string>() { "Thomas", "Ani", "Steve" }); Console.WriteLine(offsiteCourse.ToString()); }
static void Main() { LocalCourse localCourse = new LocalCourse("Databases"); Console.WriteLine(localCourse.ToString()); localCourse.Lab = "Enterprise"; Console.WriteLine(localCourse.ToString()); localCourse.Students = new List<string>() { "Peter", "Maria" }; Console.WriteLine(localCourse.ToString()); localCourse.TeacherName = "Svetlin Nakov"; localCourse.Students.Add("Milena"); localCourse.Students.Add("Todor"); Console.WriteLine(localCourse.ToString()); OffsiteCourse offsiteCourse = new OffsiteCourse( "PHP and WordPress Development", "Mario Peshev", new List<string>() { "Thomas", "Ani", "Steve" }); Console.WriteLine(offsiteCourse.ToString()); }
public static void Main() { OffsiteCourse offsiteCourse = new OffsiteCourse( "C#", "Nakov", new List<string>() { "Thomas", "Ani", "Steve" }, "Sofiq"); LocalCourse localCourse = new LocalCourse( "C#", "Nakov", new List<string>() { "Gosho", "Pesho", "Rambo" }, "light"); Console.WriteLine(offsiteCourse.ToString()); Console.WriteLine(localCourse.ToString()); }
public static void Main() { LocalCourse localCourse = new LocalCourse("Database", "Svetlin Nakov", new List<string>() { "Peter", "Maria", "Milena", "Todor" }, "Enterprise"); Console.WriteLine(localCourse.ToString()); OffsiteCourse offsiteCourse = new OffsiteCourse("PHP and WordPress Development", "Mario Peshev", new List<string>() { "Thomas", "Ani", "Steve" }, "Sofia"); Console.WriteLine(offsiteCourse); List<Course> courses = new List<Course>(); courses.Add(localCourse); courses.Add(offsiteCourse); foreach (var course in courses) { Console.WriteLine(course.Name); } }