Question: The main method below calls four other methods - namely readInput, computeAverageOfThreeScores, computeLetterGrade and printoutput. The readInput and printOutput methods have already been written. You

The main method below calls four other methods - namely readInput, computeAverageOfThreeScores, computeLetterGrade and printoutput. The readInput and printOutput methods have already been written. You are to write the other two methods that belong in the class. You will be prompted for each method and you are to write the code for each method inside the text area after the prompt. If you provide the correct response, the program should run correctly as indicated in the sample I/O sequence. Note: Your methods must make the program yield the outcome shown in the sample console I/O sequence. //---- Grader.java import java.util.Scanner; public class Grader { private int score1, score2, score3; double averageScore; private char grade; public void read Input() { Scanner kbd=new Scanner(System.in); System.out.print("Enter 3 scores between 0 and 100 each: "); score1=kbd.nextInt(); score2=kbd.nextInt(); score 3=kbd.nextInt(); //---- Write the computeAverageOfThreeScores method below. //---- Write the computeLetterGrade method below. Scale is 90+ A, 80+ B, 70+ C, 60+ D, 59- F public void printoutput() { System.out.printf("Average of %d, %d %d is %.2f Letter grade for %.2f is %s", score1, score2, score3, averageScore, averageScore, grade); public static void main(String args[]) { Grader g = new Grader(); g.readinput(); g.computeAverageOfThreeScores(); g.computeLetterGrade(); g.printOutput()
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
