Question: (C++) A local instructor wants you to write a program to calculate the average score made on tests by her students. For simplicity, she always

(C++) A local instructor wants you to write a program to calculate the average score made on tests by her students. For simplicity, she always has only 12 students in each course she teaches. She teaches multiple subjects so she would like to enter the name of the test. She wants the program to also determine the highest and lowest scores and the number of students who passed and failed the test. A score of 60 or above is considered passing. Also determine the number of scores that were an A (90 or better), B (80 89), C (70 79), D (60 69), or F (below 60).

Use main( ) as the driver function. Allow the user to process as many tests as desired.

1.Write a function to prompt the user for the following information:

(a)The name of the test.

(b)The 12 integer scores ranging from 0 to 100. (Store these scores in a one-dimensional array. Perform data validation.)

2.Write a function to determine the highest and lowest score.

3.Write a function to calculate the average score for the test.

4.Write a function to determine the number of students who passed and failed the test.

Write a function to determine the number of scores represented by each letter grade in a standard 10-point grading scale.

6.Write a function to display the tests name, all 12 scores recorded on the test, the average score, the highest and lowest score, the number of students who passed and failed the test, and number of scores that were represented by each letter grade in the standard 10-point grading scale. Display the average to a hundredth of a decimal.

Sample Input:

Please enter the name of the test: ? Biology Test 1

Enter score 1: ? 89

Enter score 2: ? 99

Enter score 3: ? 65

Enter score 4: ? 54

Enter score 5: ? 48

Enter score 6: ? 78

Enter score 7: ? 66

Enter score 8: ? 56

Enter score 9: ? 86

Enter score 10: ? 74

Enter score 11: ? 92

Enter score 12: ? 88

Sample Output:

The scores for Biology Test 1 are:

89 99 65 54 48 78 66 56 86 74 92 88

The average score is 74.58

The highest score is 99

The lowest score is 48

Number of Students who passed: 9

Number of Students who failed: 3

The number of tests represented by each letter grade is as follows:

A's: 2

B's: 3

C's: 2

D's: 2

F's: 3

Would you like to calculate the average for another test? y

Sample Input:

Please enter the name of the test: ? Latin Test 2

Enter score 1: ? 88

Enter score 2: ? 100

Enter score 3: ? 56

Enter score 4: ? 78

Enter score 5: ? 65

Enter score 6: ? 45

Enter score 7: ? 80

Enter score 8: ? 95

Enter score 9: ? 92

Enter score 10: ? 85

Enter score 11: ? 75

Enter score 12: ? 79

Sample Output:

The scores for Latin Test 2 are:

88 100 56 78 65 45 80 95 92 85 75 79

The average score is 78.17

The highest score is 100

The lowest score is 45

Number of Students who passed: 10

Number of Students who failed: 2

The number of tests represented by each letter grade is as follows:

A's: 3

B's: 3

C's: 3

D's: 1

F's: 2

Would you like to calculate the average for another test? n

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!