static void Main(string[] args)
        {
            FortuneTeller fortuneTeller = new FortuneTeller();

            //User interface displays a title then asks the user questions regarding first name, last name, age, birth month, favorite color, and number of siblings
            Console.WriteLine("Fortune Teller");
            Console.WriteLine("Your health is " + fortuneTeller.GetHealth);
            Console.WriteLine("What is your first name?");
            fortuneTeller.GetFirstName = Console.ReadLine();
            fortuneTeller.Tic();
            Console.WriteLine("What is your last name?");
            fortuneTeller.GetLastName = Console.ReadLine();
            fortuneTeller.Tic();
            Console.WriteLine("What is your age?");
            fortuneTeller.GetAge = int.Parse(Console.ReadLine());
            fortuneTeller.Tic();
            Console.WriteLine("What is your birth month? (Please provide a numeric value 1 - 12)");
            fortuneTeller.GetBirthMonth = int.Parse(Console.ReadLine());
            fortuneTeller.Tic();
            Console.WriteLine("How many siblings do you have?");
            fortuneTeller.GetSiblings = int.Parse(Console.ReadLine());;
            fortuneTeller.Tic();
            Console.WriteLine("What is your favorite color? (Please select from ROYGBIV. For help, enter \"help\"");
            fortuneTeller.GetColor = Console.ReadLine();
            fortuneTeller.Tic();
            fortuneTeller.GetHelp(fortuneTeller.GetColor);

            //displays the fortune to the user based on their answers
            Console.WriteLine("{0} {1} will retire in {2} with {3} in the bank, a vacation home in {4}, and a {5}.", fortuneTeller.GetFirstName, fortuneTeller.GetLastName, fortuneTeller.GetRetirement(), fortuneTeller.GetMoney(), fortuneTeller.GetVacationHome(), fortuneTeller.GetTransportation());
        }
Example #2
0
        static void Main(string[] args)
        {
            FortuneTeller fortuneTeller = new FortuneTeller();

            Console.WriteLine("Welcome to the Fortune Teller! Their health will decrease by 20% after each answer you give. The Fortune Teller's health is " + fortuneTeller.GetHealth + "%");
            Console.WriteLine("What is your first name?");
            fortuneTeller.GetName = Console.ReadLine();
            fortuneTeller.Tic();

            Console.WriteLine("What is your surname?");
            fortuneTeller.GetSurname = Console.ReadLine();
            fortuneTeller.Tic();

            Console.WriteLine("What is your age?");
            fortuneTeller.GetAge = int.Parse(Console.ReadLine());
            fortuneTeller.Tic();

            Console.WriteLine("What is your birth month?");
            fortuneTeller.GetMonth = int.Parse(Console.ReadLine());
            fortuneTeller.Tic();

            Console.WriteLine("How many siblings do you have?");
            fortuneTeller.GetSiblings = int.Parse(Console.ReadLine());
            fortuneTeller.Tic();

            Console.WriteLine("Select your favorite color from the ROYGBIV spectrum. Type \"Help\" if you do not understand the acronym.");
            fortuneTeller.GetColor = Console.ReadLine().ToLower();
            fortuneTeller.Tic();
            fortuneTeller.GetHelp(fortuneTeller.GetColor);


            Console.WriteLine("{0} " + "{1} " + "will retire in " + "{2} years " + "with " + "{3} " + "in the bank, a vacation home in " + "{4}, " + "and a {5}.", fortuneTeller.GetName, fortuneTeller.GetSurname, fortuneTeller.GetAge, fortuneTeller.GetMoney(), fortuneTeller.GetLocation(), fortuneTeller.GetTranspo());
        }
Example #3
0
        static void Main(string[] args)
        {
            FortuneTeller myFortune = new FortuneTeller();

            string firstName, lastName, color, vacation, transportation, bankMoney;
            string HELP = "help";
            int    age, birthMonth, sibs, yearsToRetire;



            //Writes to console, Getting user input, convert to uppercase
            Console.WriteLine("Hi, What's your first name?");
            //myFortune.QuitProgram();
            firstName = Console.ReadLine().ToUpper();


            //Writes to console, Get user input convert to all upper case
            Console.WriteLine("\nok!, What's your last name?");
            lastName = Console.ReadLine().ToUpper();

            Console.WriteLine("\n" + myFortune.GetName(firstName, lastName));

            //Writes to console, Get user input, convert to an integer, assign to age
            Console.WriteLine("\nCan you tell me your age?");
            age = int.Parse(Console.ReadLine());


            //Writes to console, Gets user input, converts to interger, assigns to birthMonth
            Console.WriteLine("\nok, what month were you born?");
            birthMonth = int.Parse(Console.ReadLine());


            //Writes to the console, gets user input, assign input to color
            Console.WriteLine("\nWhat's your favorite ROYGBIV color?, or type Help to display menu");
            color = Console.ReadLine().ToLower();
            myFortune.Help(color);


            //Writes to the console, gets user input, converts input to integer, assign input to sibs
            Console.WriteLine("\nHow many siblings do you have?");
            sibs = int.Parse(Console.ReadLine());

            yearsToRetire = myFortune.yearToRetire(age);

            vacation = myFortune.GetVacationHome(sibs);

            transportation = myFortune.GetTransportation(color);

            bankMoney = myFortune.GetRetireMoney(birthMonth);



            //Writes to the console followed by a new line
            Console.WriteLine("Processing your fortune now>>>> \n");


            //writes to console, tells user their future using stored user input values
            Console.WriteLine(firstName + " " + lastName + " will retire in " + yearsToRetire + "yrs with " + bankMoney + " in the bank, \na vaction home in "
                              + vacation + " , and a " + transportation + "\n");

            myFortune.GetFortuneQuality();
        }