Question: Complete the program below so that it prompts for and reads in a student's final class average (0.0 to 100.0), and prints out the letter

Complete the program below so that it prompts for and reads in a student's final class average (0.0 to 100.0), and prints out the letter grade the student should receive, based on the following table:

A : greater than 90.0, up to 100.0

B : greater than 80.0, up to 90.0

C : greater than 70.0, up to 80.0

D : greater than 60.0, up to 70.0

F : 0.0 up to 60.0

For example, if a student's final class average is 84.6, he has earned a letter grade of B.

Complete the following file:

import java.util.Scanner;

/** This program reads a student's final class average, and prints out the appropriate letter grade. */ public class DoGrades { public static void main(String[] args) { // Print prompt to enter a final class average System.out.print("Enter final class average: ");

// Read in final class average Scanner in = new Scanner(System.in); double average = in.nextDouble();

String finalGrade;

// Determine and print final grade // Your work here

System.out.println(finalGrade); } }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!