Reference no: EM13927072
In this assignment, you will redo Assignment 1 using functions and also extend its functionality. Like Assignment 1, you will
develop a Console Application that grades a multiple choice test with 10 questions taken by 8 students.
The applications finds each student's letter grade based on that test, and then displays:
(i) a table listing names, scores and grade for all students,
(ii) average, standard deviation, and median of the test scores,
(iii) a histogram showing the number of students who got A, B, C, D, or F, etc.
Suppose the student's names, their answers to the questions, the answer key and the score for each question are as given
below.
Student's Answers to the Questions
Jack
A B A
C C D E E A D
John
D B A
B C A E E A D
Jill
E D D
A C B E E A D
Mary
C B A
E D C E E A D
Peter
A B D
C C D E E A D
Bob
B B E
C C D E E A D
Nancy
B B A
C C D E E A D
Pat
E B E
C C D E E A D
Key
D B D
C C D A E A D
Score
2 2
5
3 3 4
4
4
6 7
1. The Main() method should create one two dimensional array to store the student's answer and three different one
dimensional arrays to store the student names, the answer key and the scores for each question, and initialize them to the
values given above.
You may create other arrays if you like, but only if necessary.
DO NOT declare any array at class-level. Every array you declare should be declared inside a function (Main or other).
Note that we may change the student responses, the answer key and/or the scores for the questions when we test your
application. So, write your code in such a way that it will work for any values.
2. The Main() method should then call a method called ComputeGrades().
The ComputeGrades method must
(1) take 3 arrays as input: one containing the student responses, the second containing the answer key, and the third
containing the scores for the questions,
(2) compute the total scores and grades that the students earn, and
(3) "return" two arrays: one containing the total score for each student and the other containing the grade the student earns.
The grading scheme to be used is: A: [90%,100%], B: [80%, 90%), C: [70%, 80%), D: [60%, 70%), F: <60%. Note that
B:[80, 90) means a student gets a B if his score is >= 80%, but strictly less than 90%.
3. The Main() method should then call a method called ComputeStatistics() that takes the students' scores array as input and
computes and "returns" the average, the standard deviation, and the median of the student scores.
4. The Main() method should then call a method called DisplayResults() that takes appropriate inputs and display the results
as shown in the sample output.
To do this, the DisplayResults() method should in turn call a method called DrawHistogram() which takes appropriate inputs
and displays the histogram as shown in the sample output.