Question
The following code is to be written using JAVA on JGRASP: Write a program that takes a list of numeric grades for a class and
The following code is to be written using JAVA on JGRASP:
Write a program that takes a list of numeric grades for a class and outputs the class average, class minimum, and class maximum as letter grades. Use this template:
import java.io.*;
import java.util.*;
public class GradeCalculator {
public static void main(String[] args) {
}
public static String getLetterGrade(double grade){
}
}
Specifications:
Write the method getLetterGrade that expects the numeric grade as a parameter and returns a String representing the letter grade.
Use this grading scale-
A: 93-100
A-: 90-92
B+: 87-89
B: 83-86
B-: 80-82
C+: 77-79
C: 73-76
C-:70-72
D+: 67-69
D: 64-66
F: Below 64
In the main method, read in input from a file.
Your file should contain a list of grades for a class. For example:
grades.txt
45.5 90.5 78.0 92.9 95.4 88.2 81.1 |
Output the class average, class minimum, and class maximum as letter grades.Use your getLetterGrade method to convert the numeric grades to letter grades. The output for the above example is:
Class average: B-
Class minimum: F
Class maximum: A
Can someone please help me form this code using beginner java?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started