Example #1
0
        static void Main(string[] args)
        {
            Student student = new Student("Kamil", "Lewalski", "1977/02/01", 2, 4, 122112);

            student.DodajOcene("ZPrOb", "2017/03/12", 5.0);
            student.DodajOcene("ZPrOb", "2017/03/14", 4.0);
            student.DodajOcene("SR", "2017/02/10", 3.0);
            student.DodajOcene("SR", "2017/03/09", 2.0);
            student.DodajOcene("PSI", "2017/03/10", 5.0);
            student.DodajOcene("SI", "2017/03/10", 4.0);
            student.DodajOcene("AiOK", "2017/03/10", 3.0);

            student.WypiszInfo();
            student.WypiszOceny();

            Console.WriteLine();

            Console.WriteLine("usun ocene SR 2017/03/09 2.0");
            student.UsunOcene("SR", "2017/03/09", 2.0);
            Console.WriteLine("usun ocene ZPrOb 2017/03/12 5.0");
            student.UsunOcene("ZPrOb", "2017/03/12", 5.0);
            student.WypiszOceny();

            Console.WriteLine();

            Console.WriteLine("usun wszystkie oceny z ZPrOb");
            student.UsunOceny("ZPrOb");
            student.WypiszOceny();

            Console.WriteLine();

            Console.WriteLine("usun wszystkie oceny");
            student.UsunOceny();
            student.WypiszOceny();

            Console.WriteLine("\n---------------------------\n");

            Pilkarz       pilkarz       = new Pilkarz("Michał", "Polny", "1994/11/12", "Napastnik", "Orły", 7);
            PilkarzReczny pilkarzReczny = new PilkarzReczny("Adam", "Góra", "1987/01/15", "Obrotowy", "Mistrzowie", 15);
            PilkarzNozny  pilkarzNozny  = new PilkarzNozny("Paweł", "Pielec", "1999/12/01", "Obrońca", "Orły2", 6);

            pilkarz.WypiszInfo();
            pilkarz.StrzelGola();
            pilkarz.WypiszInfo();
            pilkarzReczny.WypiszInfo();
            pilkarzReczny.StrzelGola();
            pilkarzNozny.WypiszInfo();
            pilkarzNozny.StrzelGola();

            Console.ReadKey();
        }
Example #2
0
        static void Main(string[] args)
        {
            Student student = new Student("Jan", "Student", "1990/05/12", 1, 3, 123456);

            student.DodajOcene("ZPrOb", "2017/03/10", 5.0);
            student.DodajOcene("ZPrOb", "2017/03/10", 4.0);
            student.DodajOcene("ZPrOb", "2017/03/10", 3.0);
            student.DodajOcene("ZPrOb", "2017/03/10", 2.0);

            student.DodajOcene("PSI", "2017/03/10", 5.0);
            student.DodajOcene("SI", "2017/03/10", 4.0);
            student.DodajOcene("AiOK", "2017/03/10", 3.0);

            student.WypiszInfo();
            student.WypiszOceny();

            Console.WriteLine();

            Console.WriteLine("usun ocene ZPrOb 2017/03/10 2.0");
            student.UsunOcene("ZPrOb", "2017/03/10", 2.0);
            student.WypiszOceny();

            Console.WriteLine();

            Console.WriteLine("usun oceny z ZPrOb");
            student.UsunOceny("ZPrOb");
            student.WypiszOceny();

            Console.WriteLine();

            Console.WriteLine("usun oceny");
            student.UsunOceny();
            student.WypiszOceny();

            Console.WriteLine("-----------------");

            Pilkarz       p  = new Pilkarz("Kazik", "Lewy", "1990/05/12", "Napastnik", "AA", 5);
            PilkarzReczny pr = new PilkarzReczny("Kazik", "Kolowy", "1990/05/12", "Obrotowy", "BB", 4);
            PilkarzNozny  pn = new PilkarzNozny("Kazik", "Strzelec", "1990/05/12", "Pomocnik", "AA", 6);

            p.StrzelGola();
            pr.StrzelGola();
            pn.StrzelGola();

            Console.ReadKey();
        }