예제 #1
0
 public Question(int id, string text, Answer answer)
 {
     this.id = id;
     this.questionText = text;
     this.answer = answer;
 }
예제 #2
0
        private void populate()
        {
            list_question = new List<Question>(5);
            Answer answer = new Answer(1, "September 1939", true, "August 1939", false, "October 1939", false);
            Question question = new Question(1, "When was 2nd world war started?", answer);
            list_question.Add(question);

            answer = new Answer(2, "Behavior of human beings", false, "Insects", true, "The formation of rocks", false);
            question = new Question(2, "Entomology is the science that studies: ", answer);
            list_question.Add(question);

            answer = new Answer(3, "Tennis", false, "Cricket", false, "Volleyball", true);
            question = new Question(3, "Federation Cup, World Cup, Allywyn International Trophy and Challenge Cup are awarded to winners of:",
                answer);
            list_question.Add(question);

            answer = new Answer(4, "resistance power increases", false, "the infrared light kills bacteria in the body", false,
                "the ultraviolet rays convert skin oil into Vitamin D", true);
            question = new Question(4, "Exposure to sunlight helps a person improve his health because:", answer);
            list_question.Add(question);

            answer = new Answer(5, "by wind erosion", false, "of its mineral content", true, "by water erosion", false);
            question = new Question(5, "The chief purpose of crop rotation is to check the loss of top soil", answer);
            list_question.Add(question);
        }