write a C++ program. Write a program that calculates and displays the average of a group of test scores, all integers, after the lowest score in the group has been dropped. There are six test scores in the group. The program must contain only the following functions in addition to the main: • void getScore should ask the user for a test score, store it in a reference parameter variable, and validate it. This function should be called by the main function once for of the six scores to be entered by the user. • double calcAverage should calculate and return the average of the five highest scores. This function should be called just once by the main function, and should be passed the six scores. Use pass by reference to receive the lowest test score. • int findLowest should find and return the lowest of the six scores passed to it. It must be called by the calcAverage function, which uses it to determine which of the six scores to drop. • void displayResults should be called by the main function to display the lowest test dropped and the average of the test scores. The function should be called with the lowest test score and the average score. (please include this in the program) No input, processing, or output should happen in the main function. All work should be delegated to functions. Do not accept test scores lower than 0 or higher than 100.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter12: Adding Functionality To Your Classes
Section12.2: Providing Class Conversion Capabilities
Problem 5E
icon
Related questions
Question

write a C++ program.

Write a program that calculates and displays the average of a group of test scores, all integers, after the lowest score in the group has been dropped. There are six test scores in the group. The program must contain only the following functions in addition
to the main:
• void getScore should ask the user for a test score, store it in a reference
parameter variable, and validate it. This function should be called by the main
function once for of the six scores to be entered by the user.
• double calcAverage should calculate and return the average of the five highest scores. This function should be called just once by the main function, and should be passed the six scores. Use pass by reference to receive the lowest test score.
• int findLowest should find and return the lowest of the six scores passed to it. It must be called by the calcAverage function, which uses it to determine which of the six scores to drop.
• void displayResults should be called by the main function to display the lowest test dropped and the average of the test scores. The function should be called with the lowest test score and the average score. (please include this in the program)
No input, processing, or output should happen in the main function. All work
should be delegated to functions. Do not accept test scores lower than 0 or
higher than 100.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Reference Types in Function
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning