ive been searching through at least 5 different forums on various sites (including this one) and i still cant understand why i'm getting the error message illegal start of expression at
public static overallNumGrade(int quiz1, int quiz2, int quiz3)
here is the full program:
import java.util.scanner;
public class Jungmichel3
{
public static void main(String[] args)
{
int quizzes;
int midterm;
int finalTestGrade;
int finalNumGrade;
char letterGrade;
public static overallNumGrade(int quiz1, int quiz2, int quiz3)
{
System.out.println("Please enter grade from quiz 1:");
System.out.println("Please enter grade from quiz 2:");
System.out.println("Please enter grade from quiz 3:");
Scanner keyboard = new Scanner(System.in);
quiz1 = keyboard.nextInt();
quiz2 = keyboard.nextInt();
quiz3 = keyboard.nextInt();
quizzes = (quiz1*.833 + qui2*.833 + quiz3*.833);
System.out.println();
System.out.println("Please enter the midterm grade:");
midterm = keyboard.nextInt();
System.out.println();
System.out.println("Please enter the final grade:");
finalTestGrade = keyboard.nextInt();
finalNumGrade = (quizzes*.25) + (midterm*.35) + (finalTestGrade*.40);
System.out.println("The final numerical grade is " + finalNumGrade);
}
public static letterGrade(char A, char B, char C, char D)
{
if ( (finalNumGrade <= 100) && (finalNumGrade >= 90) )
{
System.out.println("The letter grade is an A");
lettergrade = A;
}
else if ( (finalNumGrade <= 89) && (finalNumGrade >= 80) )
{
System.out.println("The letter grade is a B");
lettergrade = B;
}
else if ( (finalNumGrade <= 79) && (finalNumGrade >= 70) )
{
System.out.println("The letter grade is a C");
lettergrade = C;
}
else if ( (finalNumGrade <= 89) && (finalNumGrade >= 80) )
{
System.out.println("The letter grade is a D");
lettergrade = D;
}
else
{
System.out.println("ERROR: The number grade does not compute.");
}
};
}
}
i know it has something to do with nesting a method inside another method... but im really confused. could someone help me and explain it to me in laymen's terms? thanks ahead of time!
-lauren