Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program that calculates the average of a group of test scores, where the lowest score in the group is dropped. Replace the five

image text in transcribed

Write a program that calculates the average of a group of test scores, where the lowest score in the group is dropped. Replace the five double variables used in your original program to represent the individual scores with a single array of five doubles Your program should include these three functions: void getScore), which prompts the user for a test score, stored it in a reference parameter which references the appropriate element in the array of doubles, and validates that it is not lower than O or higher than 100. This function should be called by main once for each of the five test scores to be entered. void calculateAverage) should calculate and display the average of the four highest test scores. This function should be called just once by main and should be passed the array of five scores (not the individual scores) int findLowest) should find and return the lowest of the five scores passed to it as a single array. It should be called by calculateAverage, which uses the function to determine which of the five scores to drop. Use the following test score sets: 1. 80, 98, 21, 25, 37 2. 100, 90, 80, 70, 60 3. 60, 70, 80, 90, 100 4. 80, 80, 80, 80, 80 Be sure to demonstrate what happens when the user enters a score less than O and enters a score higher than 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

Next Generation Databases NoSQLand Big Data

Authors: Guy Harrison

1st Edition

1484213300, 978-1484213308

More Books

Students also viewed these Databases questions