public void GetInformation() { Console.WriteLine("Ученик 1:"); pupil1.Read(); pupil1.Study(); pupil1.Write(); pupil1.Relax(); Console.WriteLine("Ученик 2:"); pupil2.Read(); pupil2.Study(); pupil2.Write(); pupil2.Relax(); Console.WriteLine("Ученик 3:"); pupil3.Read(); pupil3.Study(); pupil3.Write(); pupil3.Relax(); Console.WriteLine("Ученик 4:"); pupil4.Read(); pupil4.Study(); pupil4.Write(); pupil4.Relax(); }
static void Main(string[] args) { Pupil p1 = new Pupil(); Pupil p2 = new Pupil(); Pupil p3 = new Pupil(); ClassRoom classRoom = new ClassRoom(p1, p2, p3); ExcelentPupil excelentPupil = new ExcelentPupil(); GoodPupil goodPupil = new GoodPupil(); BadPupil badPupil = new BadPupil(); p1.Read(); }