QuestionQuestion

Transcribed TextTranscribed Text

Program Description You will develop Console Application that grades a multiple choice test with 10 questions taken by students The applications finds each student's letter grade based on that test, and then displays: (i) table listing names, scores and grade for all students, (ii) average, standard deviation, and median of the test scores, (iii) 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 ABACCDEEAD John Jill Mary Peter A D Bob B D D Nancy B C D D Pat E B E C C D E E A D Key D B D C C D A E A D Score 2253344467 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 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 way that it will work for any values. 2. The Main() method should then call method called ComputeGrades(). The ComputeGrades method must (1) take 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 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 method called DisplayResults() that takes appropriate inputs and display the results as shown in the sample output To dothis. the DisplayResults( method should in turn call method called DrawHistogram() which takes appropriate inputs and displays the histogram as shown in the sample output. Sample Output - #0 Grate Bull 27.25 Press key lo cont Note: You do not have to have the same amount of spacing as shown in the sample output above. But make sure that the output is neatly formatted, the columns in the table of student information are left aligned and all the values are displayed with only two decimal spaces. Hints: 1. Use the following formulas for calculating variance and standard deviation: Var [x Std.Dev.- /Var " 2. You can use Math.Sqrt( ) method to calculate the square root. Check the .NET Framework Class Library documentation for details on the Math.Sqrt() method Here is a piece of code that is showing how it can l be used. double x; double 5; Math.Sqrt(y); //x will get square root of 5

Solution PreviewSolution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

class Program
    {
       /**
         * ComputeStatistics takes the students’ scores array as input and computes
         * and returns” the average, the standard deviation, and the median of the student
         * scores
         */
       private static void ComputeStatistics(int[] score, ref double avg, ref double sd, ref double median)
       {
            double var = 0;
            Array.Sort(score);
            avg = 0;
            for (int i = 0; i < score.Length; i++)
            {
                avg += score[i];
            }
            avg = avg / score.Length;

            // the formular of var in the assignment is wrong
            for (int i = 0; i < score.Length; i++)
            {
                var += (score[i] - avg) * (score[i] - avg);
            }
            var = var / score.Length;
            sd = Math.Sqrt(var);...
$30.00 for this solution

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available C-Family Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Decision:
Upload a file
Continue without uploading

SUBMIT YOUR HOMEWORK
We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats