EECE - CSCI 111 EECE 135 Programming Assignment#4 DUE...

Info icon This preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
CSCI 111 / EECE 135 Programming Assignment #4 DUE: Friday, March 16, 12:00 noon (system time at ect-unix.ecst.csuchico.edu ) I. The Next American Idol (Programming Challenge 6.9, p. 368) A. Overview For the next American Idol , a panel of 5 judges will be used, each of whom awards 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. B. Instructions Write a program that uses the score-calculation method described above to calculate a contestant's score. Your program should include the following functions: 1. 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 your function main() once for each of the 5 judges. 2. double calcScore() should calculate and return the average of the three scores that remain after dropping the highest and lowest scores the performer received. This function should be called once for each contestant by your function main() , and it should be passed the 5 scores from the judges. The following functions should be called by your calcScore() function, who uses the returned information to determine which of the scores to drop: 3. double findLowest() should find and return the lowest of the 5 scores passed to it. 4. double findHighest() should find and return the highest of the 5 scores passed to it.
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Design your program with a loop so that after a contestant's score is determined, the user is asked if there is another contestant - the program repeats the whole process until the user indicates that there are no other contestants. (Assume that there is at least one contestant in the competition!) Your program should also keep track of contestant numbers (see sample session below) and the highest score received - upon termination, your program should report the winner based on the highest score calculated. (Note: Assume that calculated scores are unique and that there will be NO TIES. In case a high score is repeated, simply keep track of the first contestant with that high score.) Input Validation: Do not accept judge sores lower than zero or higher than 10.
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern