Question: Description: Write program in C++. This program is going to allow you to calculate your grade for the class. In your program, you will ask
Description: Write program in C++. This program is going to allow you to calculate your grade for the class. In your program, you will ask for the user name (it should be able to include spaces). You will then ask for grades for homework assignments and have the user enter -1 when they have entered all of the grades. Next, you will ask the user for programming grades and again have them enter -1 when all are entered. You will ask for the quiz grades or -1 to end. You will ask for the exam grades or -1 to end. You will read the values into an array so that you can pass them to a function (the function is defined below). Consider: Do you need more than one array?
You will calculate the grade percentage as follows:
if homework grades sum the homework grades
divide the sum of the homework grades by the number of homework grades entered
multiple the result by 10
Add the result to the overall score
Sum the program grades
Divide the sum of the program grades by the number of program grades entered if no homework grades
multiply the result by 50
else
multiple the result by 40
Add the result to the overall score
Sum the quiz grades
Divide the sum of the quiz grades by then number of quiz grades entered
Multiply the result by 10
Add the result to the overall score
Sum the exam grades
Divide the sum of the exam grades by the number of exam grades entered
Multiply by 40
Add the result to the overall score
Once you have calculated the overall score, print out the name in all capital letters (even if the user enters lower case), print out the overall score, and print out the corresponding letter grade as given below.
A = 93% to 100 %
A- = 90% to 92.9%
B+ = 85% to 89.9%
B = 82% to 84.9%
B- = 80% to 81.9%
C+ = 76% to 79.9%
C = 72% to 75.9%
C- = 69.5% to 71.9%
D+ = 68 % to 69.5 %
D = 65 % to 67.9 %
D- = 60 % to 64.9 %
F < 60 %
Requirements: If more than 2 exam grades are less than 60, then you are to print out an F for the grade.
You are to write a function that will accept an array, the size of the array, and the value that is to be used to multiply by. The function will calculate the sum of the array, divide by number in the array and multiple by the value passed into the function. It will return the result to the calling program.
You are to use a function that will accept the overall score and return the letter grade. Write your functions below main and provide prototypes for the functions at the top of your program.
Sample Output
Santa Claus 65.3 D
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
