Question
Java Programming Problem 2 - Diving **This question has been anwsered before but I have to use the methods given to solve it. In the
Java Programming Problem 2 - Diving
**This question has been anwsered before but I have to use the methods given to solve it.
In the sport of diving, seven judges award a score between 0 and 10, where each score may be a floating-point value. The highest and lowest scores are thrown out and the remaining scores are added together. The sum is then multiplied by the degree of difficulty for that dive. The degree of difficulty ranges from 1.2 to 3.8 points. The total is then multiplied by 0.6 to determine the divers score. Write a computer program that will ultimately determine the divers score.
This program must include the following methods:
A method name inputValidScore that inputs one valid score for one judge for one diver. This method will return the valid score.
A method named inputAllScores that creates an array to store the scores for all judges for the diver. This method will fill the array with a valid score from each judge. This method does not take input arguments, but it does return the array of scores.
A method named inputValidDegreeOfDifficulty that inputs a valid degree of difficulty for the dive. The valid degree of difficulty will be returned from the method.
A method named calculateScore that will calculate the score for the diver based on the scores from all judges and the degree of difficulty. The score will be returned from the method.
A main method that uses the previous methods to determine the score for the diver and then prints out the score to the console.
Directions You may only use statements that are discussed in the book through Chapter 6. You must not use any Array class or Array method included in the Java libraries to solve this problem. Console input and output must be used to solve this problem.
Use the following input values for the final test of this program:
Degree of difficulty 2.7
Judge #1 score 7.5
Judge #2 score 9.5
Judge #3 score 5.7
Judge #4 score 8.25
Judge #5 score 6.72
Judge #6 score 10.0
Judge #7 score 3.46
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started