Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft SQL Server 2012 Unleashed

Authors: Ray Rankins, Paul Bertucci

1st Edition

0133408507, 9780133408508

More Books

Students also viewed these Databases questions

Question

Explain the function and purpose of the Job Level Table.

Answered: 1 week ago