Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Database Experts Guide To SQL

Authors: Frank Lusardi

1st Edition

0070390029, 978-0070390027

More Books

Students also viewed these Databases questions