static void Main(string[] args) { Pupil p1 = new BadPupil(); Pupil p2 = new ExcelentPupil(); ClassRoom group = new ClassRoom(p1, p2); group.Study(); Console.WriteLine(new string('-', 30)); group.Read(); Console.WriteLine(new string('-', 30)); group.Write(); Console.WriteLine(new string('-', 30)); group.Relax(); Console.ReadKey(); }
static void Main(string[] args) { Pupil p1 = new BadPupil(); Pupil p2 = new GoodPupil(); Pupil p3 = new ExcelentPupil(); Pupil p4 = new Pupil(); ClassRoom room1 = new ClassRoom(p1, p2, p3); room1.Study(); Console.WriteLine(new string('*', 20)); room1.Read(); Console.WriteLine(new string('*', 20)); room1.Write(); Console.WriteLine(new string('*', 20)); room1.Relax(); Console.ReadKey(); }