Example #1
0
        static void Main(string[] args)
        {
            Console.WriteLine(Human.Population);
            Human      person1    = new Human("Daniil", "Stepanov", 139);
            Human      person2    = new Human("Ivan", "Ivanovich", "Ivanov", 20);
            Sportman   sportman   = new Sportman("Grisha", "Pypkin", 33, 123);
            Biatlonist biatlonist = new Biatlonist("Daria", "Domracheva", 35, 23, 12, 99.9);
            Chessman   chessman   = new Chessman("Garry", "Casparov", 68, 101, 158);

            Console.WriteLine(Human.Population);
            Console.WriteLine(person1);
            Console.WriteLine(person2["Name"]);
            Console.WriteLine(sportman);
            Console.WriteLine(biatlonist);
            Console.WriteLine(chessman);
            Console.ReadKey();
        }
Example #2
0
        static void Main(string[] args)
        {
            Console.WriteLine(Human.Population);
            Human    person1    = new Human("Daniil", "Stepanov", 139);
            Human    person2    = new Human("Ivan", "Ivanovich", "Ivanov", 20);
            Sportman biatlonist = new Biatlonist("Daria", "Domracheva", 35, 23, Sportman.Titul.Champion, 12, 99.9);
            Sportman chessman   = new Chessman("Garry", "Casparov", 68, 101, Sportman.Titul.MS, 158);

            Console.WriteLine(Human.Population);
            Console.WriteLine(person1);
            Console.WriteLine(person2["Name"]);
            Console.WriteLine(biatlonist);
            Console.WriteLine(chessman);
            biatlonist.play();
            chessman.play();
            biatlonist.play("Minsk");
            chessman.play("Berlin");
            Console.ReadKey();
        }