Ejemplo 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();
        }
Ejemplo 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();
        }
Ejemplo 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();
        }
Ejemplo n.º 4
0
        static void Main(string[] args)
        {
            Quiz          quiz1    = new Quiz("LC101");
            List <string> q2answer = new List <string> {
                "a", "b", "x"
            };
            MultiChoice q1 = new MultiChoice("For what could you use a for loop? \nA. Print to screen \nB. Assign a " +
                                             "variable \nC. Go through a series of list items.", "c");
            Checkbox q2 = new Checkbox("What languages have we worked with so far: \nA. Python \nB. HTML " +
                                       "\nC. C++", q2answer);
            TrueFalse q3 = new TrueFalse("Java is the same as JavaScript", "f");

            quiz1.AddQuestion(q1);
            quiz1.AddQuestion(q2);
            quiz1.AddQuestion(q3);
            quiz1.TakeQuiz();
            Console.ReadLine();
        }
Ejemplo n.º 5
0
 public void AddTFQ(TrueFalse tfq)
 {
     TFQ.Add(tfq);
     TotalQuestions++;
 }