Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A talent show competition has five (5) judges, each of whom awards a score between 0 and 10. The scores allow floating-point number values, such

A talent show competition has five (5) judges, each of whom awards a score between 0 and 10. The scores allow floating-point number values, such as 8.5. A participants final score is determined by eliminating the lowest and highest score (only one value, if there are duplicate lowest/highest scores) and then averaging the remaining scores (number of judges, minus 2). You are to implement a solution that implements the preceding requirements. You are to utilize an array to store and process the judges scores. The solution must include the following methods: 1. void getJudgeData(double[]): Obtain the scores for the five (5) judges. Call method getJudgeScore() to obtain each judges score. 2. double getJudgeScore(int): Solicit and validate the score value for an individual judge. You are to pass the judges number as a parameter to the method. Do not RETurn from the method until a valid value is entered. The RETurn value is the judges score. 3. double calculateScore(double[]): Calculates and RETurns the average of the judges scores after dropping one highest score and one lowest score received. This method shall call the following two methods to determine the lowest and highest scores received: a. double findLowest(double[]): RETurns the lowest score received. b. double findHighest(double[]): RETurns the highest score received. Extra Credit (5 points): Allow the User to determine the number of judges for the event. The number is to be restricted between 5 and 9 judges, inclusive. You are to utilize the following method to obtain the number of judges: 1. int nmbrJudges(): Prompt the User for the number of judges for the event. You must validate the input value and not RETurn from the method until a valid value is entered. The RETurn value is the number of judges.

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

More Books

Students also viewed these Databases questions