So you think you can dance
Hi everyone! I have an issue with one of the coding here. The question is as below: You are an assistant on a TV show where celebrities are dancing and 4 judges evaluate their performance and give them a score between 1 and 10. The program you are given takes the scores as input. Complete the method to take them as parameters, then calculate and return the average score. This is my coding: import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner read = new Scanner(System.in); double score1 = read.nextDouble(); double score2 = read.nextDouble(); double score3 = read.nextDouble(); double score4 = read.nextDouble(); double avgScore = getAverageScore(score1, score2, score3, score4); System.out.println(avgScore); } //create your method here public static double getAverageScore(double score1, double score2, double score3, double score4) { double[] numArray = {score1, score2, score3, score4}; double sum = 0.0; for (double num: numArray) { sum += num; } double avgScore = sum / numArray.length; System.out.format("The average is: %.2f", avgScore); } return; } I hope someone can help me and explain to me what i did wrong. Thanks.