Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Here what the output should look like. Create a new project and name it: Add a n

ID: 3648790 • Letter: H

Question



Here what the output should look like.


Create a new project and name it: Add a new tile and name It driver.cpp In main(), declare an array named: testScores Array size = 5 The array holds test scores (double data type). Use a constant variable named SIZE In the array declaration. Include these 4 functions. getScores This function prompts the user to enter 5 test scores, (see output) The testScores array is passed to the function. The scores entered by the user are read and assigned to the testScores array. Use for loop to read in and assign the scores. The function is void-returning. showMenu After the screen clears, this function displays a menu of 2 choices. (see output) No arguments are passed to the function, and no value Is returned. getChoice After the screen clears, this function prompts the user to enter a choice, No arguments are passed to the function, The user is choice is read and assigned to a variable (char) Then the value is returned to main(). displayResult After the screen clears, this function displays the result, depending on, the user's choice. If the user enters a C or any, other average Is displayed, (see output) If the user enters B or b, all of the test scores are displayed. However, if the user makes a mistake and enters a C or any other letter, this is displayed: Invalid entry!

Explanation / Answer

#include using namespace std; //prototypes void getScores(double[]); void showMenu(); char getChoice(); void displayResult(double[],char); int main(){ const int SIZE=5; double testScores[SIZE];//declare array of size SIZE char choice; //function calls getScores(testScores); showMenu(); choice=getChoice(); displayResult(testScores,choice); return 0; } void getScores(double Scores[]){ cout