Exemplo n.º 1
0
        // Second task data
        public static State[] SecondTaskData()
        {
            // Republic class.
            Republic republicEmpty     = new Republic();
            Republic republicCongo     = new Republic("The Republic of the Congo", "Denis Sassou Nguesso", 5125821, 58, "Africa", 7, 72, 6);
            Republic republicCzech     = new Republic("The Czech Republic", "Miloš Zeman", 10610947, 25, "Europe", 10, 200, 4);
            Republic republicTurkey    = new Republic("The Republic of Turkey", "Recep Tayyip Erdoğan", 80810525, 95, "Asia", 5, 550, 4);
            Republic republicArgentina = new Republic("The Argentine Republic", "Mauricio Macri", 43847430, 102, "America", 4, 329, 2);
            Republic republicNauru     = new Republic("The Republic of Nauru", "Baron Waqa", 10084, 50, "Oceania", 3, 19, 3);

            // Monarchy class.
            Monarchy monarchyEmpty     = new Monarchy();
            Monarchy monarchyBelgium   = new Monarchy("Belgium", "Philippe", 11358357, 189, "Europe", "The House of Saxe-Coburg and Gotha");
            Monarchy monarchyAustralia = new Monarchy("Australia", "Elizabeth II", 24067700, 117, "Oceania", "House of Windsor");
            Monarchy monarchyJamaica   = new Monarchy("Jamaica", "Elizabeth II", 43847430, 56, "America", "House of Windsor");

            // Kingdom class.
            Kingdom kingdomEmpty       = new Kingdom();
            Kingdom kingdomSaudiArabia = new Kingdom("The Kingdom of Saudi Arabia", "Salman", 33000000, 87, "Asia", "The Sudairi Seven");
            Kingdom kingdomMarocco     = new Kingdom("The Kingdom of Morocco", "Mohammed VI", 33848242, 62, "Africa", "The Alaouite dynasty");

            // State array.
            State[] states = new State[13];

            states[0] = republicEmpty;    states[6] = monarchyEmpty;     states[10] = kingdomEmpty;
            states[1] = republicCongo;    states[7] = monarchyBelgium;   states[11] = kingdomSaudiArabia;
            states[2] = republicCzech;    states[8] = monarchyAustralia; states[12] = kingdomMarocco;
            states[3] = republicTurkey;   states[9] = monarchyJamaica;
            states[4] = republicArgentina;
            states[5] = republicNauru;

            return(states);
        }
Exemplo n.º 2
0
        public static void FirstTask()
        {
            // State class.
            State state1 = new State();                                                        // Without parameters;
            State state2 = new State("Australia", "Elizabeth II", 24067700, 117, "Australia"); // With parameters

            // Republic class.
            Republic republic1 = new Republic();
            Republic republic2 = new Republic("The Republic of the Congo", "Denis Sassou Nguesso", 5125821, 58, "Africa", 7, 72, 6);

            // Monarchy class.
            Monarchy monarchy1 = new Monarchy();
            Monarchy monarchy2 = new Monarchy("Belgium", "Philippe", 11358357, 189, "Europe", "The House of Saxe-Coburg and Gotha");

            // Kingdom class.
            Kingdom kingdom1 = new Kingdom();
            Kingdom kingdom2 = new Kingdom("the Kingdom of Saudi Arabia", "Salman", 33000000, 87, "Asia", "The Sudairi Seven");

            // Array of states.
            State[] stateArr = new State[8];
            stateArr[0] = state1;
            stateArr[1] = state2;
            stateArr[2] = republic1;
            stateArr[3] = republic2;
            stateArr[4] = monarchy1;
            stateArr[5] = monarchy2;
            stateArr[6] = kingdom1;
            stateArr[7] = kingdom2;

            // Showing the elements.
            Console.Clear();
            Console.WriteLine("THE RESULT OF THE 1ST TASK:");
            foreach (State s in stateArr)
            {
                s.Show();
            }

            Console.WriteLine("Press ENTER to back to the main menu");
            Console.ReadLine();
        }