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

Write a program that reads a students name together with hisor her test scores.

ID: 3619131 • Letter: W

Question

Write a program that reads a students name together with hisor her test scores. The program should then compare the averagetest score for each student and assign the appropriate grade. thegrade scale is as follows: 90-100 -> A; 80-89->B;70-79->C; 60-69->D; 0-59->F.
Your program must use the following methods: a. A value returning method, calculateAverage, to determineand return the average of five test scores for each student. Use aloop to read and sum the five test scores.(This method does notoutput the average test score. That task must be done in the methodmain.) b. A value-returning method, calculateGrade, to determine andreturn each student's grade. (This method does not output thegrade. That task must be done in the method main.) Test your program on the following data. ead the data from thefile and send the output to a file. Do not use any globalvariables. Use the appropriate parameters to pass values in and outof methods. Johnson 85 83 77 91 76 Aniston 80 90 95 93 48 Cooper 78 81 11 90 73 Gupta 92 83 30 69 87 Blair 23 45 96 38 59 Clark 60 85 45 39 67 Kennedy 77 31 52 74 83 Bronson 93 94 89 77 97 Sunny 79 85 28 93 82 Smith 85 72 49 75 63 Write a program that reads a students name together with hisor her test scores. The program should then compare the averagetest score for each student and assign the appropriate grade. thegrade scale is as follows: 90-100 -> A; 80-89->B;70-79->C; 60-69->D; 0-59->F.
Your program must use the following methods: a. A value returning method, calculateAverage, to determineand return the average of five test scores for each student. Use aloop to read and sum the five test scores.(This method does notoutput the average test score. That task must be done in the methodmain.) b. A value-returning method, calculateGrade, to determine andreturn each student's grade. (This method does not output thegrade. That task must be done in the method main.) Test your program on the following data. ead the data from thefile and send the output to a file. Do not use any globalvariables. Use the appropriate parameters to pass values in and outof methods. Johnson 85 83 77 91 76 Aniston 80 90 95 93 48 Cooper 78 81 11 90 73 Gupta 92 83 30 69 87 Blair 23 45 96 38 59 Clark 60 85 45 39 67 Kennedy 77 31 52 74 83 Bronson 93 94 89 77 97 Sunny 79 85 28 93 82 Smith 85 72 49 75 63

Explanation / Answer

please rate - thanks import java.util.*; import java.io.*; public class Main { public static void main(String[] args)throwsFileNotFoundException       {Scanner in=new Scanner(newFile("input.txt"));        PrintStream output=newPrintStream(new File("output.txt"));        String name;        char grade;        int []score=new int[5];        double average;        int i;        output.println("name average grade");         while(in.hasNext())               { name=in.next();                  for(i=0;i= 80)            return'B';        else if(average >= 70)            return'C';        else if(average >= 60)            return'D';        else           return'F';       } }
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