CIS 1111 Programming Topic 11 – Sinclair’s Got Talent Solved

30.00 $

Category:

Description

5/5 - (1 vote)

Write a C++ program to determine the winner of the “Sinclair’s Got Talent” contest. The contest has five judges, each of whom awards a score between 1 and 10 for each of the performers. Fractional scores are not allowed. A contestant’s final score is determined by dropping the highest and lowest scores received, then averaging the three remaining scores (the average should be rounded to two decimal places). The winner is the contestant with the highest average score. If there is a tie, the winner will be the first contestant judged.

Requirements:

  1. Input the contestant’s first name followed by the 5 judges’ scores. You do not know how many contestants there are. Design the loop so the loop terminates when you are finished entering contestants.
  2. Input validation: Do not accept a judge’s score that is less than 1 or greater than 10.  As each score is entered send the score to a function to test the score’s validity.
  3. Use function calcAvgScore that has the contestant’s 5 scores as input parameters
    1. returns the average score for that contestant.
    2. Calls two functions, findLowest and findHighest which both accept the 5 scores as input parameters and return the lowest and highest scores, respectively.
  4. Do not use global variables. All variables used in the functions must be passed as parameters or declared locally.
  5. At the end of the program, display the winner and winning score (rounded to 2 decimal places).

Sample Output:

 

 

Submit:

Zipped folder named LastNameFirstNameCIS1111NameOfAssignment which contains:

  1. Your .cpp file
  2. Screen shots of your code and output

 

  • CIS-1111-Programming-Topic-11.zip