Question: This project aims to generate several randomly ordered booklet and their answer sheet from a single input exam sample file. The program receives an input
This project aims to generate several randomly ordered booklet and their answer sheet from a single input exam sample file. The program receives an input text file with a restricted format(Check the sample input file, sample.txt) containing tens of multiple-choice questions(assume N questions) and the correct answer to each question. then the user determines how many booklets (assume m) with how many questions(assume n<=N) should be generated. As the output files, the program generates 2 files for each booklet, one for the questions and one for the answer sheet(a total of 2*m files). in the booklets, the order of the questions should be random, and the options should be randomly changed. So you should select randomly n questions out of N and change the order of their options. Of course, a question should not be in a booklet more than one time.
Hints: Create a Question structure containing the following features: 1- Question number (int) 2- Question body (string) 3- option A (string) 4- option B (string) 5- option C (string) 6- option D (string) 7- Answer (char) Then create another structure for storing all questions in it, name it Question_Bank. Read the questions from the file convert them into the Question structure and store them in the Qestion_Bank
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
