Esempio n. 1
0
        static void Main(string[] args)
        {
            MultipleChoiceQuestion first = new MultipleChoiceQuestion();

            first.SetText("What was the original name of the Java language?");
            first.AddChoice("*7", false);
            first.AddChoice("Duke", false);
            first.AddChoice("Oak", true);
            first.AddChoice("Gosling", false);
            first.SetGrade(2);
            first.SetCategory("Knowledge");
            MultipleChoiceQuestion second = new MultipleChoiceQuestion();

            second.SetText("In which country was the inventor of Java born?");
            second.AddChoice("Australia", false);
            second.AddChoice("Canada", true);
            second.AddChoice("Denmark", false);
            second.AddChoice("United States", false);
            second.SetGrade(1);
            second.SetCategory("Common knowledge");
            Question third = new Question();

            third.SetText("What is this programming language called");
            third.SetAnswer("CSharp");
            third.SetGrade(1);
            third.SetCategory("Common knowledge");

            PresentQuestion(first);
            PresentQuestion(second);
            PresentQuestion(third);
        }
Esempio n. 2
0
        //hard coded mc questions
        public static List <IQuiz> create()
        {
            IQuiz q1 = new MultipleChoiceQuestion()
            {
                Answer     = "B",
                Difficulty = 2,
                Category   = "Animals",
                Question   = "What animal is animal?",
                choices    = new List <string> {
                    "A: Dog", "B: Cat", "C: Elephant"
                }
            };
            IQuiz q2 = new MultipleChoiceQuestion()
            {
                Answer     = "A",
                Difficulty = 3,
                Category   = "Animals",
                Question   = "Where animal live?",
                choices    = new List <string> {
                    "A: Hotel", "B: Water", "C: Gas"
                }
            };
            IQuiz q3 = new MultipleChoiceQuestion()
            {
                Answer     = "B",
                Difficulty = 3,
                Category   = "Technology",
                Question   = "Just buy a?",
                choices    = new List <string> {
                    "A: Lamp", "B: Laptop", "C: House"
                }
            };
            IQuiz q4 = new MultipleChoiceQuestion()
            {
                Answer     = "C",
                Difficulty = 2,
                Category   = "Technology",
                Question   = "Do you know when to go to how you will know?",
                choices    = new List <string> {
                    "A: Ok", "B: Yes", "C: No"
                }
            };

            return(new List <IQuiz>()
            {
                q1, q2, q3, q4
            });
        }