コード例 #1
0
        static void Main(string[] args)
        {
            Ukraine.Kiev kiev = new Ukraine.Kiev();
            kiev.Set_get_kiev = 2967000;
            kiev.Show_population_Kiev();

            Console.WriteLine("------------------------------------------------------");
            France.Paris paris = new France.Paris();
            paris.Set_get_Paris = 2148000;
            paris.Show_population_Paris();

            Console.WriteLine("------------------------------------------------------");
            USA.Washington washington = new USA.Washington();
            washington.Set_get_Washington = 705749;

            Console.WriteLine("-----------------------------------------------------------------------------------");
            Console.WriteLine("\tComparison of the population of the three capitals of the world\n");
            if (kiev.Set_get_kiev > paris.Set_get_Paris && kiev.Set_get_kiev > washington.Set_get_Washington)
            {
                Console.WriteLine("The population of Kiev is the largest of the three capitals");
            }
            else if (paris.Set_get_Paris > kiev.Set_get_kiev && paris.Set_get_Paris > washington.Set_get_Washington)
            {
                Console.WriteLine("The population of Paris is the largest of the three capitals");
            }
            else if (washington.Set_get_Washington > kiev.Set_get_kiev && washington.Set_get_Washington > paris.Set_get_Paris)
            {
                Console.WriteLine("The population of Washington is the largest of the three capitals");
            }
            Console.WriteLine();
        }
コード例 #2
0
        static void Main(string[] args)
        {
            Town one    = new Rusian.Moscow();
            Town second = new Ukraine.Kiev();
            Town thert  = new USA.NewYork();

            Comparison.ComparisonPopulation(one, second, thert);
        }
コード例 #3
0
        static void Main(string[] args)
        {
            Ukraine.Kiev  ob1 = new Ukraine.Kiev(2884000);
            Russia.Moscow ob2 = new Russia.Moscow(11920000);
            Belarus.Minsk ob3 = new Belarus.Minsk(1975000);

            Console.WriteLine("The population of Kiev is {0} inhabitants.\n", ob1.Population);
            Console.WriteLine("The population of Moscow is {0} inhabitants.\n", ob2.Population);
            Console.WriteLine("The population of Minsk is {0} inhabitants.\n", ob3.Population);
        }
コード例 #4
0
        static void Main(string[] args)
        {
            Ukraine.Kiev ob1 = new Ukraine.Kiev(2850000);
            USA.NewYork  ob2 = new USA.NewYork(8400000);
            Japan.Tokio  ob3 = new Japan.Tokio(12800000);

            Console.WriteLine("The population of Kiev is {0} inhabitants.\n", ob1.Population);
            Console.WriteLine("The population of NewYork is {0} inhabitants.\n", ob2.Population);
            Console.WriteLine("The population of Tokio is {0} inhabitants.\n", ob3.Population);

            Console.ReadKey();
        }
コード例 #5
0
    static void Main()
    {
        Franse.Paris parise = new Franse.Paris();
            Ukraine.Kiev kiev = new Ukraine.Kiev();
            Poland.Varshava varshava = new Poland.Varshava();

            if (parise.population > kiev.population && parise.population > varshava.population)
            {
                Console.WriteLine("Parise population the most");
            }
            else
                if (kiev.population > parise.population && kiev.population > varshava.population)
                {
                    Console.WriteLine("Kiev population the most");
                }
                else
                {
                     Console.WriteLine("Varshava population the most");
                }
    }