Question: C++ Basic Program Logic As with the previous programs, prompt the user for the program average and save that value in a double/float variable. As

C++

Basic Program Logic

As with the previous programs, prompt the user for the program average and save that value in a double/float variable.

As with program 2, get the sum of the user's test scores, the maximum test points available, the number of quizzes that the user has taken, and the sum of all of the user's quiz scores.

If the user has taken more than two quizzes, then they should be prompted to enter the sum of the two lowest quiz scores. If there are two or fewer quizzes, nothing should be asked about the two lowest quiz scores.

If the user has taken more than two quizzes, the test average is calculated as in Program 2. If there are two or fewer quizzes, the test average is calculated as follows:

(sum of test scores + sum of quiz scores) / (maximum test points available + (10 * number of quizzes)) * 100 

Once the test average has been calculated, use it and the program average to calculate the course average. The formula is the same as in programs 1 and 2.

As with program 2, display the program average, test average, and course average with exactly 2 digits after the decimal point.

Program Requirements

At the top of your C++ source code, include a documentation box that resembles the one from programs 1 and 2. This will be a part of every program that is submitted during the semester and this will be the last reminder in the program write-ups.

Include line documentation. There is no need to document every single line, but logical "chunks" of code should be preceded by a line or two that describes what the "chunk" of code does. This will also be a part of every program that is submitted for the remainder of the semester.

The float/double values must be displayed with exactly 2 digits after the decimal point.

Make sure and test your program with values that you have calculated.

Hand in a copy of your source code (the CPP file) using Blackboard.

Output

A couple of runs of the program should resemble the following:

Run 1

Enter the program average: 75.26 Enter the sum of the test scores: 76 Enter the maximum test points available: 100 Enter the number of quizzes that have been taken: 2 Enter the sum of all of the quizzes that have been taken: 17 *********************** Grade Calculator Program Average 75.26 Test/Quiz Average 77.50 Course Average 76.83 *********************** 

Run 2

Enter the program average: 75.26 Enter the sum of the test scores: 76 Enter the maximum test points available: 100 Enter the number of quizzes that have been taken: 5 Enter the sum of all of the quizzes that have been taken: 42 Enter the sum of the two lowest quiz scores: 13 *********************** Grade Calculator Program Average 75.26 Test/Quiz Average 80.77 Course Average 79.12 *********************** 

Extra Credit 1

For up to 5 points of extra credit, add code that will use the calculated course average to determine and display the user's letter grade. The grading scale is as follows:

A: 90.00% - 100% B: 80.00% - 89.99% C: 70.00% - 79.99% D: 60.00% - 69.99% F: 0.00% - 59.99%

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!