TrueAndFalse(int marks, string header, AnswerList answers)
 {
     _marks   = marks;
     _body    = answers.ToString();
     _header  = header;
     _answers = answers;
 }
Exemple #2
0
        static void Main(string[] args)
        {
            QuestionList Qlist = new QuestionList();

            AnswerList tof = new AnswerList();

            tof.AddRange(new Answer[] { new Answer("true"), new Answer("false") });

            AnswerList ans = new AnswerList();

            ans.Add(new Answer("true"));

            Question tf = new TrueOrFalse("is that you", tof, ans, 10);

            Qlist.Add(tf);
            Qlist.Add(new TrueOrFalse("is that ", tof, ans, 30));

            Qlist.Add(new ChooseOne("who are you ", tof, ans, 50));
            Qlist.Add(new ChooseOne("how are you ", tof, ans, 5));

            Qlist.Add(new ChooseAll("who am i ", tof, ans, 1));
            Qlist.Add(new ChooseAll("who ", tof, ans, 6));


            Exam <Question> .ExamEvent += Exam <Question> .printState;

            PracticeExam <Question> x = new PracticeExam <Question>(30, 6, mode.starting);

            x.generateExam();
        }
Exemple #3
0
 public Question(string header, string body, AnswerList chooses, AnswerList modleAnswer, float marks)
 {
     _header      = header;
     _body        = body;
     _marks       = marks;
     _chooses     = chooses;
     _modleAnswer = modleAnswer;
 }
Exemple #4
0
        public FinalExam(int time, int questions_Number) : base(time, questions_Number)
        {
            QuestionList MCQs    = new QuestionList("mcq1", "Multiple Choise Questions");
            Answer       a1      = new Answer("egypt", true);
            Answer       a2      = new Answer("china", true);
            Answer       a3      = new Answer("japan", true);
            Answer       a4      = new Answer("india", true);
            AnswerList   answers = new AnswerList("1");

            answers.Add(a1);
            answers.Add(a2);
            answers.Add(a3);
            answers.Add(a4);
            mcq1 = new MCQ(10, "where are you from?", answers);
        }
Exemple #5
0
        public override bool Equals(object obj)
        {
            AnswerList ans = (AnswerList)obj;

            if (ans.Count == Count)
            {
                for (int i = 0; i < Count; i++)
                {
                    if (this[i].answer != ans[i].answer)
                    {
                        return(false);
                    }
                }
                return(true);
            }
            return(false);
        }
Exemple #6
0
 public Question(string body, AnswerList chooses, AnswerList modleAnswer, float marks) : this("", body, new AnswerList(), new AnswerList(), marks)
 {
 }
Exemple #7
0
 public ChooseAll(string body, AnswerList chooses, AnswerList modleAnswer, float marks) : base("Choose All", body, chooses, modleAnswer, marks)
 {
     _fileName = "CA";
 }
Exemple #8
0
 public TrueOrFalse(string body, AnswerList chooses, AnswerList modleAnswer, float marks) : base("True or False", body, chooses, modleAnswer, marks)
 {
     _fileName = "TOF";
 }
 public MCQ(int marks, string header, AnswerList answers)
 {
     _marks   = marks;
     _body    = answers.ToString(); _header = header;
     _answers = answers;
 }