Write a java program that expects a numeric grade as input and outputs the corre
ID: 3529680 • Letter: W
Question
Write a java program that expects a numeric grade as input and outputs the corresponding letter grade.Explanation / Answer
import java.until.*; import java.io.*; public class Assign7{ public static void main(String[] args)throws Exception{ Record.setGP(1.25, 1.25, 0.25, 0.50); Scanner myIn = new Scanner( new File("scores.txt") ); public static void main getLetterGrade if (finalScore > 90) letter = 'A'; else if (finalScore > 80) letter = 'B'; else if (finalScore > 70) letter = 'C'; else if (finalScore > 60) letter = 'D'; else letter = 'F'; System.out.println( myIn.nextLine() +" avg "+"letter"); while( myIn.hasNext() ){ Record myR = new Record(myIn.next(), myIn.nextInt(), myIn.nextInt(), myIn.nextInt(), myIn.nextInt()); System.out.println( myR ); } OR import java.util.Scanner; public class ExamScores { public static void main (String[]args) { String letterGrade; double numberOfGrades; double grade; //create scanner object Scanner scan = new Scanner(System.in); //ask user for input System.out.println("How many grades do you have to enter?: "); //reads in the number of grades user wants to enter as double from keyboard numberOfGrades = scan.nextDouble(); //now since program knows how many grades are being entered it can //control the input for(int j = 1; j = 90 && grade = grade = 80 && grade = grade = 70 && grade = grade = 60 && grade = grade = 0 && grade = gradeRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.