Example #1
0
        static void Main(string[] args)
        {
            Student student = new Student();

            School school = new School();

            Console.WriteLine("Studying at school");
            student.Study(school);

            University university = new University();

            Console.WriteLine("\nEnter to Unniversity\n");
            ISchool enterToUnversity = new EnterToUniversityAfterSchool(university);

            Console.WriteLine("Studying at university");
            student.Study(enterToUnversity);

            Console.ReadKey();
        }
 public EnterToUniversityAfterSchool(University uni)
 {
     university = uni;
 }