Beispiel #1
0
        static void Main(string[] args)
        {
            List <Country>    countryDb  = FileIO.GetDataFile();
            CountryController controller = new CountryController(countryDb);

            controller.WelcomeAction();
        }
Beispiel #2
0
 static void Main(string[] args)
 {
     bigBoss = new CountryController(
         new Country("The United States", "North America", "Red", "White", "Blue"),
         new Country("Dogland", "Where the doggos live", "White", "Green", "Gray"),
         new Country("Russia", "Europe/Asia", "White", "Blue", "Red"),
         new Country("Australia", "Dinosaur Island", "White", "Red", "NavyBlue"));
     bigBoss.WelcomeAction();
     do
     {
         bigBoss.SelectCountryAction();
     } while (Utilities.GetYesNoInput("Enter y(es) to continue or n(o) to exit: "));
 }
Beispiel #3
0
        static void Main(string[] args)
        {
            List <string> usaColor = new List <string> {
                "red", "white", "blue"
            }, canadaColor = new List <string> {
                "red", "white"
            }, chinaColor = new List <string> {
                "red", "yellow"
            };
            List <Country> CountryDB = new List <Country> {
                new Country("USA", "North America", usaColor), new Country("Canada", "North America", canadaColor), new Country("China", "Asia", chinaColor)
            };
            CountryController master = new CountryController(CountryDB);

            do
            {
                master.WelcomeAction();
                master.SelectCountry(Console.ReadLine());

                Console.WriteLine("Would you like to try another country? (y/n)");
            } while (Console.ReadLine().ToLower() == "y");
        }