Hey guys, im pretty new to java as this is my first time ever taking such a course, and i have an assignment that i have to complete that im stuck on and i have no idea what to do next.
Heres what i have so far, and i doubt its right
import TerminalIO.KeyboardReader;
public class GradingScaleRP1{
private String name;
private String letter;
private double grade;
public int number;
public int numberR;
public GradingScaleRP1(){
name = "";
letter = "";
grade = 0;
number = 0;
numberR = 0;
}
public GradingScaleRP1(String nm, String range, double average, int n, int nR){
this();
name = nm;
letter = range;
grade = average;
number = n;
numberR = nR;
}
public static String getLetterGrade(double average){
String range;
if (average >= 96)
range = "A+";
else if (92 <= average && average <= 95)
range = "A";
else if (90 <= average && average <= 91)
range = "A-";
else if (86 <= average && average <= 89)
range = "B+";
else if (82 <= average && average <= 85)
range = "B";
else if (80 <= average && average <= 81)
range = "B-";
else if (76 <= average && average <= 79)
range = "C+";
else if (72 <= average && average <= 75)
range = "C";
else if (70 <= average && average <= 71)
range = "C-";
else if (66 <= average && average <= 69)
range = "D+";
else if (62 <= average && average <= 65)
range = "D";
else if (60 <= average && average <= 61)
range = "D-";
else if (average <= 59)
range = "F";
return range;
}
public static double classAverage(){
}
}
Now, what i have to do is create a method getLetterGrade, which i think i have done correctly, and i also have to have it so it outputs the class average, the class minimum, and the class maximum as letter grades. So im stuck because i have to make it ask the user how many grades there putting in and such to get the average, min, and max, but i first have to figure out how i could get the average which is where im stuck. Hopefully you guys can help., and if you dont understand really what im asking, i can just put the actual question in for you.