static void Main(string[] args) { Pupil p1 = new ExcellentPupil(); Pupil p2 = new GoodPupil(); ClassRoom _class = new ClassRoom(p1, p2); _class.Read(); _class.Write(); _class.Relax(); _class.Study(); Console.ReadKey(); }
static void Main(string[] args) { Pupil pupil_1 = new ExcelentPupil(); Pupil pupil_2 = new GoodPupil(); ClassRoom classRoom = new ClassRoom(new Pupil[] { pupil_1, pupil_2 }); Console.WriteLine("Study"); classRoom.Study(); Console.WriteLine("Read"); classRoom.Read(); Console.ReadKey(); }
static void Main(string[] args) { Pupil p1 = new BadPupil(); Pupil p2 = new ExcelentPupil(); Pupil p3 = new ExcelentPupil(); ClassRoom group = new ClassRoom(p1, p2, p3); 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(); }