Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A particular talent competition has 4 judges, each of whom awards a score between 0 and 20 to each performer, such as 8.3, 10... A

A particular talent competition has 4 judges, each of whom awards a score between 0 and 20 to each performer, such as 8.3, 10... A performers final score is determined by dropping the highest, and lowest score received, then averaging the 2 remaining scores. Write a program that uses this method to calculate a contestants score. It should include the following functions:

void getJudgeData, should ask the user for a judges score, store it in a reference parameter variable, and validate it by not accepting judge scores lower than 0 or higher than 20. This function should be called by main once for each of the 4 judges.

void calcScore, should calculate and display the average of the 2 scores that remain after dropping the highest and lowest scores the performer received. The result must be displayed with one decimal place.This function should be called just once by main and should be passed the 4 scores.

The last two functions, described below, should be called by calcScore, which uses the returned information to determine which of the scores to drop.

double findLowest, should find and return the lowest of the 4 scores passed to it.

double findHighest, should find and return the highest of the 4 scores passed to it.

sample run:

Enter the judge's score: 6 Enter the judge's score: 70 That is an invalid score. Please try again. The score must be from 0 to 20. Enter the judge's score: 19 Enter the judge's score: 10 Enter the judge's score: 8 The performer's final score is 9.0. Process returned 0 (0x0) execution time : 532.385 s Press any key to continue.

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

Logistics Lifeline Supply Chain Strategies

Authors: Ehsan Sheroy

1st Edition

7419377502, 978-7419377503

More Books

Students also viewed these Databases questions

Question

Does it have at least one-inch margins?

Answered: 1 week ago

Question

Does it highlight your accomplishments rather than your duties?

Answered: 1 week ago