Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a C++ program which: Write a program which uses the following arrays: Prompts the user for 5 test scores as integers greater than or

Write a C++ program which:

Write a program which uses the following arrays: Prompts the user for 5 test scores as integers greater than or equal to zero and less than or equal to 100. Ensures that the user entries are valid (integers greater than or equal to zero and less than or equal to 100). Stores the 5 tests scores in an array. Uses the bubble sort to sort the scores in ascending order. Calculates the letter grade for each test Displays the letter grade of each score as well as the overall average (the average of the 5 tests). You must include a method called calcAverage to compute the average of the 5 test scores; it takes an array of type int as a parameter and returns the average. You must include a method called validateUserInput to ensure user entries are integers greater than or equal to zero and less than or equal to 100. You must include a method determineGrade to compute the average of the 5 test scores; it takes an int array with the test scores and a char array to store the corresponding letter grades. The letter grade is arrived at using the table below: score Letter Grade >=90 A >=80 and <90 b>=70 and <80 c>=60 and <70 d>=0 and <60 F. You must include a method called bubbleSort which sorts the values (test scores) stored in the array in ascending order. You must include a method called displayTestScores which displays each test score and its corresponding letter, as well as the overall average.

GENERAL RESTRICTIONS

No global variables. No labels or go-to statements. No infinite loops, examples include: for(;;) while(1) while(true) do{//code}while(1); No break statements to exit loops If you violate any of these restrictions, you will automatically get a score of ZERO!

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

OpenStack Trove

Authors: Amrith Kumar, Douglas Shelley

1st Edition

1484212215, 9781484212219

Students also viewed these Databases questions

Question

How wide are Salary Structure Ranges?

Answered: 1 week ago