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

Next season, American Idol is going to add two more judges for the total of five

ID: 3641395 • Letter: N

Question

Next season, American Idol is going to add two more judges for the total of five judges. Each judge will award a score between 0 and 10 to each performer. Fractional scores, such as 8.3 are allowed. A performer’s final score is determined by dropping the highest and the lowest score received, then averaging the three remaining scores.
They hired you to write a program that uses this method to calculate a contestant’s score. It should include the following functions:
• void getJudgeData() should ask the user for a judge’s score, store it in a reference parameter variable and validate it. This function should be called by main once for each of five judges.
• void calcScore() should calculate and display the average of the three scores that remain after dropping the highest and the lowest scores for the performer received. This function should be called just once by main, and should be passed the five 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.
• int findLowest() should find and return the lowest of the five scores passed to it.
• int findHighest() should find and return the highest of the five scores passed to it
Input Validation: Do not accept judge scores lower than 0 or higher than 10.


#include <iostream>
#include <iomanip>
using namespace std;

// Function prototypes
void getJudgeData(double &);
void calcScore(double, double, double, double, double);
double findLowest(double, double, double, double, double);
double findHighest(double, double, double, double, double);

int main()
{

double score1; // To hold the 1st score.
double score2; // To hold the 2nd score.
double score3; // To hold the 3rd score.
double score4; // To hold the 4th score.
double score5; // To hold the 5th score.

// Get the five judges scores.
getJudgeData(score1);
getJudgeData(score2);
getJudgeData(score3);
getJudgeData(score4);
getJudgeData(score5);


// Display the average score after dropping
// the lowest and highest scores.
calcScore(score1, score2, score3, score4, score5);

system("PAUSE");
return EXIT_SUCCESS;
}

Explanation / Answer

#include #include using namespace std; void getJudgeData(double &score) { cout > score; cout
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote