COMP1202 Group Project
(Group size : 2)
Note: All group members must be from the same lab session
Due: Friday 3rd April 2020 at 11:30 pm
A multiple-choice examination consists of 20 questions. Each question has five choices, labeled A, B, C, D
and E. All data for that exam is stored in a file exam.txt. The first line of data contains the co
ect
answers to the twenty questions in the first 20 consecutive (one after the other) character positions. For
Example:
BECDCBAADEBACBEDDBED
Each subsequent line in the file contains the answers for a single candidate. Data on a line consists of a
candidate number (an integer), then by one or more spaces, followed by the twenty answers given by
the candidate in the next 20 consecutive character positions. An X is used if a candidate did not answer
a particular question. A sample line is as follows:
5555 BECDCXACCAEDCBEDDACB
There can be an unlimited number of candidates. A line containing a “candidate number” 0 indicates the
end of the data.
A student’s final score is calculated by adding up the points awarded for all the questions. Points for a
question are awarded as follows:
• Co
ect answer 4 points
• Wrong answer -1 point
• No answer XXXXXXXXXXpoints
Write a C# program to process the data in the file exam.txt and generate a report that shows:
1. Each candidate number and their final score (the total points obtained by the candidate).
2. The total number of candidates.
3. The number of co
ect responses to each of the 20 questions.
4. The minimum score attained by a student in the exam.
5. The maximum score attained by a student in the exam.
6. The average score attained by a student in the exam.
The report must be written to a file called Report.txt.
Required for submission as 2 separate files (do not add the word document to the zip file):
1) A Microsoft word document with
a. The names and student numbers of all group members
. The complete code solution pasted into it.
2) You must also compress(zip) your complete solution and upload it to blackboard.
The names and id numbers of all group members must be commented at the top of the program
One member of each group must be responsible for uploading the “project submission document”
containing the C# program code.
Sample data that can be in the file exam.txt:
Sample program output: (Note the output below does not match the sample file above and is purely
for possible layout of information and does not have the additional minimum, maximum and average score.)
BACCDEABCEEDCDABBAED
6734 BXCCDAABCEEDCDACBAED
7843 BADCXAABCEXXCDABBAED
2223 BCBAEACCDAEDCDABBAEA
2324 BACXDEABCEEDCDAABAED
3474 BACCDEABCEEDCDABBAED
3434 XADCDAABCEEDCDABBAED
6374 XXXXXCXXXXXXXXXXXAED
3332 BADCDEABCEEDCDADBCEX
3454 BACCXEABCEEDCXABBAED
0