Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Hello i need help with JAVA project if someone can help i\'ll be really grateful

ID: 3715913 • Letter: H

Question

Hello i need help with JAVA project if someone can help i'll be really grateful here's project:

In a gymnastics competition, each contestant’s score is calculated by dropping the lowest and highest scores and then adding the remaining scores. Write a program that allows the user to enter 8 judges’ scores and then output the points received by the contestant. A judge awards points between 1 and 10, with 1 being the lowest and 10 being the highest. For example, if the scores are 9.2, 9.3 9.0, 9.9, 9.5, 9.5, 9.6 and 9.8, the contestant receives a total of 56.90 points. Format the output with 2 decimal places. Make sure to verify that the scores entered are between 1 and 10 inclusive.

Explanation / Answer

package comptitivescore.CScore;
import java.util.Scanner;

public class java {
public static void main(String[] args) {
double score[][]=new double[3][8];
double fscore[]=new double[3],sc;
int i,j, min=0,max=0;
Scanner input= new Scanner(System.in);
System.out.print(" Enter the Score of Judges: ");
for(i=0;i<3;i++)
fscore[i]=0;
for(i=0;i<3;i++)
{
System.out.print(" Enter the Score of Contestent:"+(i+1));
for(j=0;j<8;j++)
{
while(true)
{
sc=input.nextDouble();
if(sc<1||sc>10)
{
System.out.print(" Re=enter:");
sc=input.nextDouble();
}
else{
score[i][j]=sc;
break;
}
}
if(score[i][j]>score[i][max])
max=j;
if(score[i][j]<score[i][min])
min=j;
fscore[i]+=score[i][j];
}
fscore[i]=fscore[i]-(score[i][min]+score[i][max]);
min=0;
max=0;
}
System.out.println();
for(i=0;i<3;i++)
System.out.print(fscore[i]+" ");
input.close();
}
}

Output:

run:

Enter the Score of Judges:

Enter the Score of Contestent:11
2
3
4
5
6
7
8

Enter the Score of Contestent:29.2
9.3
9.0
9.9
9.5
9.6
9.8
9.5

Enter the Score of Contestent:31
1
1
1
1
1
1
1

27.0 56.9 6.0 BUILD SUCCESSFUL (total time: 1 minute 35 seconds)

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote