Create the Java program that will solve the problem.
In a diving competition, each contestant's score is calculated by dropping the lowest and highest scores and then add the remaining scores. Scores in all diving meets use a range from one to ten, in ½ point increments. Diving meets must be scored using a minimum of three judges, but can be scored using as many as nine judges. The score of each dive is calculated by first adding the total awards of three judges. This is known as the raw score. The raw score is then multiplied by the degree of difficulty of the dive and you have the total diver’s score for the dive. Degree of Difficulties (D.D.) range from 1.2 to 4.8. If there are only three judges, then you do not drop the lowest and highest; you use all three scores.
The output from the program will be the divers score
Here is an sample run of the program:
Enter the number of judges for the competition: 8
Enter the degree of difficulty: 2.5
Judge 1 score: 9.0
Judge 2 score: 8.5
Judge 3 score: 6.5 <<< lowest score dropped
Judge 4 score: 9.5 <<< highest score dropped
Judge 5 score: 8.5Judge 6 score: 8.0
Judge 7 score: 7.5
Judge 8 score: 7.0
Add the rest of the values and the sum is: 48.5 * 2.5 (D.D.)
The output generated will be:
The contestant received 121.25 points.
Some processing requirements:
must use an array to hold the diving scores
must prompt the user for the number of judges for the competition
must use a for loop for data entry
must validate data entry
give user a clear and concise error message
prompt for the user to re-enter data correctly
until they enter in valid data
must use a value-returning method named, highestScore, that returns the highest value in the array
must us a value-returning method named, lowestScore, that returns the lowest value in the array
In a diving competition, each contestant's score is calculated by dropping the lowest and highest scores and then add the remaining scores. Scores in all diving meets use a range from one to ten, in ½ point increments. Diving meets must be scored using a minimum of three judges, but can be scored using as many as nine judges. The score of each dive is calculated by first adding the total awards of three judges. This is known as the raw score. The raw score is then multiplied by the degree of difficulty of the dive and you have the total diver’s score for the dive. Degree of Difficulties (D.D.) range from 1.2 to 4.8. If there are only three judges, then you do not drop the lowest and highest; you use all three scores.
The output from the program will be the divers score
Here is an sample run of the program:
Enter the number of judges for the competition: 8
Enter the degree of difficulty: 2.5
Judge 1 score: 9.0
Judge 2 score: 8.5
Judge 3 score: 6.5 <<< lowest score dropped
Judge 4 score: 9.5 <<< highest score dropped
Judge 5 score: 8.5Judge 6 score: 8.0
Judge 7 score: 7.5
Judge 8 score: 7.0
Add the rest of the values and the sum is: 48.5 * 2.5 (D.D.)
The output generated will be:
The contestant received 121.25 points.
Some processing requirements:
must use an array to hold the diving scores
must prompt the user for the number of judges for the competition
must use a for loop for data entry
must validate data entry
give user a clear and concise error message
prompt for the user to re-enter data correctly
until they enter in valid data
must use a value-returning method named, highestScore, that returns the highest value in the array
must us a value-returning method named, lowestScore, that returns the lowest value in the array
OR