HI! i need to create a program that lets user input as many numeric grades as they like.... in return they get the letter grade for each and the their grade average, minimum, and maximum.

this is all i have so far......

import TerminalIO.KeyboardReader;

public class LetterGradeWLT {

public static void main (String [] args){
KeyboardReader reader = new KeyboardReader();

public boolean getLetterGrade(int grade){

grade = reader.readInt("Enter your numeric grade: ");
int grade;

if (grade >= 96)
System.out.println(" Your letter grade is A+.");
if ( 92 <= grade <= 95)
System.out.println(" Your letter grade is A.");
if ( 90 <= grade <= 91)
System.out.println(" Your letter grade is A-.");
if ( 86 <= grade <= 89)
System.out.println(" Your letter grade is B+.");
if ( 82 <= grade <= 85)
System.out.println(" Your letter grade is B.");
if ( 80 <= grade <= 81)
System.out.println(" Your letter grade is B-.");
if ( 76 <= grade <= 79)
System.out.println(" Your letter grade is C+.");
if ( 72 <= grade <= 75)
System.out.println(" Your letter grade is C.");
if ( 70 <= grade <= 71)
System.out.println(" Your letter grade is C-.");
if ( 66 <= grade <= 69)
System.out.println(" Your letter grade is D+.");
if ( 62 <= grade <= 65)
System.out.println(" Your letter grade is D.");
if ( 60 <= grade <= 61)
System.out.println(" Your letter grade is D-.");
if ( -1 < grade <= 59)
System.out.println(" Your letter grade is F.");
}
}

so which part are you having trouble with?

what i have so far wont complie and i dont know how to loop it so that it asks for multiple grades

will u plz make it more clear......
for eg how many subject do a student have or u want d average,max. etc of a particular student or of whole d class.........

what i have so far wont complie and i dont know how to loop it so that it asks for multiple grades

i think it will work..
System.out.print("\nenter d no of max grades?");
int n=in.nextInt();
for(i=0;i<n;i++)
{
//body of ur program...
}

will u plz make it more clear......
for eg how many subject do a student have or u want d average,max. etc of a particular student or of whole d class.........

i need the average, max, and min (in letter grades) of the student's list of grades (how ever many grades they have)

Code tags and formatting please:

[code=JAVA] // paste code here

[/code]

import TerminalIO.KeyboardReader;

public class LetterGradeWLT {

public static void main (String [] args){
KeyboardReader reader = new KeyboardReader();

public boolean getLetterGrade(int grade){

grade = reader.readInt("Enter your numeric grade: ");
int grade;

if (grade >= 96)
System.out.println(" Your letter grade is A+.");
if ( 92 <= grade <= 95)
System.out.println(" Your letter grade is A.");
if ( 90 <= grade <= 91)
System.out.println(" Your letter grade is A-.");
if ( 86 <= grade <= 89)
System.out.println(" Your letter grade is B+.");
if ( 82 <= grade <= 85)
System.out.println(" Your letter grade is B.");
if ( 80 <= grade <= 81)
System.out.println(" Your letter grade is B-.");
if ( 76 <= grade <= 79)
System.out.println(" Your letter grade is C+.");
if ( 72 <= grade <= 75)
System.out.println(" Your letter grade is C.");
if ( 70 <= grade <= 71)
System.out.println(" Your letter grade is C-.");
if ( 66 <= grade <= 69)
System.out.println(" Your letter grade is D+.");
if ( 62 <= grade <= 65)
System.out.println(" Your letter grade is D.");
if ( 60 <= grade <= 61)
System.out.println(" Your letter grade is D-.");
if ( -1 < grade <= 59)
System.out.println(" Your letter grade is F.");
}
}

Saying it doesn't compile isn't specific enough. What errors do you get? What is TerminalIO.KeyboardReader? Does that come with the Java installation or is it self-written? If it's self-written, since you don't post it, we can't comment. You do have a function inside your main function and more starting brackets than ending brackets, which are errors.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.