Exemplo n.º 1
0
        static void Main(string[] args)
        {
            TrueFalse test = new TrueFalse("The abreviation for United States is \"US.\"", true);

            test.AskQuestion();

            List <string> options = new List <string>();

            options.Add("a: Sunday");
            options.Add("b: Wednesday");
            options.Add("c: Friday");

            MultipleChoice test2 = new MultipleChoice("What is the first day of the Week?", 'a', options);

            test2.AskQuestion();

            List <string> options2 = new List <string>();

            options2.Add("a: Sunday");
            options2.Add("b: Wednesday");
            options2.Add("c: Friday");

            List <char> answer = new List <char>();

            answer.Add('b');
            answer.Add('c');


            CheckBox test3 = new CheckBox("Which days are not the weekend?", answer, options2);

            test3.AskQuestion();
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            MultipleChoice MCQ1 = new MultipleChoice("What is SHINee's color?",
                                                     "pearl aqua", new List <string>()
            {
                "red", "blue", "pearl aqua"
            });
            MultipleChoice MCQ2 = new MultipleChoice("What is SHINee debut date?",
                                                     "May 25", new List <string>()
            {
                "July 18", "May 25", "September 23", "December 14"
            });

            TrueFalse TFQ1 = new TrueFalse("Onew is the leader of SHINee.", "true");

            CheckBox CB1 = new CheckBox("Which of the following are SHINee members?",
                                        new List <string>()
            {
                "Taemin", "Onew"
            }, new List <string>()
            {
                "Kai",
                "Onew", "Leeteuk", "Taemin", "Taeyong"
            });

            Quiz SHINee = new Quiz();

            SHINee.AddMCQ(MCQ1);
            SHINee.AddMCQ(MCQ2);
            SHINee.AddTFQ(TFQ1);
            SHINee.AddCBQ(CB1);

            SHINee.StartQuiz();
        }
Exemplo n.º 3
0
        static void Main(string[] args)
        {
            Quiz     quiz        = new Quiz();
            Question trueFalse   = new TrueFalse("The moon is in space.", "true");
            Question multiChoice = new MultipleChoice("What year is it?", "2020", "1904", "happy birthday", "2017", 0);
            Question checkbox    = new Checkbox("Which two elements make up the sun?", "Oxygen", "Helium", "Hydrogen", "Carbon", 1, 2);

            quiz.Add(trueFalse);
            quiz.Add(multiChoice);
            quiz.Add(checkbox);
            quiz.Run();
        }
Exemplo n.º 4
0
 public void DetermineWhichQuestionToMake(string choice)
 {
     Console.Write("[{0}] ", questionTypes[choice]);
     if (choice == "1")
     {
         MultipleChoice newQuestion = new MultipleChoice();
         questions.Add(dictionaryIndex.ToString(), newQuestion);
         dictionaryIndex++;
     }
     else if (choice == "2")
     {
         TrueOrFalse newQuestion = new TrueOrFalse();
         questions.Add(dictionaryIndex.ToString(), newQuestion);
         dictionaryIndex++;
     }
     else
     {
         CheckBox newQuestion = new CheckBox();
         questions.Add(dictionaryIndex.ToString(), newQuestion);
         dictionaryIndex++;
     }
 }
Exemplo n.º 5
0
 public void AddMCQ(MultipleChoice mcq)
 {
     MCQ.Add(mcq);
     TotalQuestions++;
 }