Help with this method
Can someone help debug the code below as a solution to this problem?: The program takes scores as input. The method should take the inputs as parameters, and then calculate and return the average score. Sample Input 6.0 4.0 5.0 3.0 Sample Output 4.5 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); } //what is wrong with this method? public static double getAverageScore(double score1, double score2, double score3, double score 4) { double avgScore = (score1 + score2 + score3 + score4)/4; return (double avgScore); } }