A University has decided to computerize its exam grading. They have a standard paper that contains 25 multiple choice questions each with four choices. All the answers by students are entered in a file. You are to read the file and calculate if the student passed or failed (60% or greater is considered a pass). The input file will look like this:

32
1 1 2 2 3 4 3 3 3 …………….2 2
Ram 1 1 2 2 2 2 3 3 ………………….2 1
Ronan 1 1 2 2 3 3 3 4 3………………1.1
.
.
.
.
EOF

The first line of the file will have one number that has the number of students who took the exam. The second line contains 25 numbers (from 1 to 4) separated by spaces. These are the correct choices for each of the 25 questions. From the third line onwards, the student answers are given. The line first starts with the name of the student and followed by 25 choices that he selected as answers. You should compare each student’s answers with the correct answers and decide his percentage.

The output should be written into a file and each line of the file should look like this:
Ram PASS 76%
Rogan FAIL 42%
.
.
.


Use a class to store the details of the student. Use arrays wherever appropriate. The detailed design along with the algorithms, the module charts, the ADT of the class/classes used should be specified along with the final solution.

A University has decided to computerize its exam grading. They have a standard paper that contains 25 multiple choice questions each with four choices. All the answers by students are entered in a file. You are to read the file and calculate if the student passed or failed (60% or greater is considered a pass). The input file will look like this:

32
1 1 2 2 3 4 3 3 3 …………….2 2
Ram 1 1 2 2 2 2 3 3 ………………….2 1
Ronan 1 1 2 2 3 3 3 4 3………………1.1
.
.
.
.
EOF

The first line of the file will have one number that has the number of students who took the exam. The second line contains 25 numbers (from 1 to 4) separated by spaces. These are the correct choices for each of the 25 questions. From the third line onwards, the student answers are given. The line first starts with the name of the student and followed by 25 choices that he selected as answers. You should compare each student’s answers with the correct answers and decide his percentage.

The output should be written into a file and each line of the file should look like this:
Ram PASS 76%
Rogan FAIL 42%
.
.
.


Use a class to store the details of the student. Use arrays wherever appropriate. The detailed design along with the algorithms, the module charts, the ADT of the class/classes used should be specified along with the final solution.

Thanks for telling us your assignment, what do you want us to do?

This article has been dead for over six months. Start a new discussion instead.