Esempio n. 1
0
        public static void Main(string[] args)
        {
            string a = " K-24 ";

            Group gr = new Group(a);

            Console.WriteLine(gr.GroupName);

            string b = " Sasha Timofeyeva ";
            string c = " Stukalo Bogdan ";
            string d = " Evgeniy Ivanov ";

            GoodStudent st1 = new GoodStudent(b);
            GoodStudent st2 = new GoodStudent(c);
            BadStudent  st3 = new BadStudent(d);

            st1.Study();
            st2.Study();

            gr.AddStudent(st1);
            gr.AddStudent(st2);
            gr.AddStudent(st3);
            Console.WriteLine("Here is short info: ");
            Console.WriteLine(gr.GetInfo());
            Console.WriteLine("Here is full info: ");
            Console.WriteLine(gr.GetFullInfo());


            Console.ReadKey();
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            Student     st1    = new Student("Klara");
            GoodStudent st2    = new GoodStudent("Vlad");
            BadStudent  st3    = new BadStudent("Nataliia");
            Group       group1 = new Group("K-24");

            group1.AddStudent(st1);
            group1.AddStudent(st3);
            group1.AddStudent(st2);
            st1.Study();
            st2.Study();
            st3.Study();
            Console.Write(group1.GetInfo());
            Console.Write(group1.GetFullInfo());
        }