Question: Create a C++ program with two user-defined functions/modules that works in the following way: The main part of the program will ask a user if

 Create a C++ program with two user-defined functions/modules that works in

Create a C++ program with two user-defined functions/modules that works in the following way: The main part of the program will ask a user if they have test scores to enter. Use a switch statement to handle the logic: if they answer no, the program will exit or if they answer yes (see sample input/output for how to format this), ask the user how many tests they would like to enter. Your default statement will handle a bad entry and exit. Use a Repetition Structure to ask the user for the appropriate amount of tests. In each loop, call a single function, passing in no data, but prompting the user to enter a test score and return it to the main. Accumulate all a. of the test scores into one variable. Once all data points are entered, call a second function/module, passing in the number of tests that were entered as well as the accumulated total of the test scores. This function does not b. return anything to the main. The second function/module will the calculate the final course average based on the variables that were passed in. It will also calculate the letter grade for the average using nested if/else C. statements. 90- 100 is an A, 80 - 89 is a B, 70- 79 is a C, 60-69 is a D and 59 or less is an E. Output the final average test score, the number of tests entered and the correct Grade. Extra Credit (2 Points): Round the grade percentage to two decimal points. Extra Credit (8 Points): Use data verification loops to check these user inputs (4 points each): d. e. Number of tests to enter (valid is less than 11 but more than 0) and test scores (valid is greater than or equal to 0 and less than or equal to 100)

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!