Esempio n. 1
0
        public ClassRoom(Pupil pupil1, Pupil pupil2, Pupil pupil3)
        {
            Random rand = new Random();

            this.pupil1 = pupil1;
            this.pupil2 = pupil2;
            this.pupil3 = pupil3;
            switch (rand.Next(3))
            {
            case 1:
                this.pupil4 = new GoodPupil("Bob");
                break;

            case 2:
                this.pupil4 = new BadPupil("Bob");
                break;

            case 3:
                this.pupil4 = new ExcellentPupil("Bob");
                break;
            }
        }
Esempio n. 2
0
 public ClassRoom(Pupil pupil)
 {
     _pupil = pupil;
 }