This should be a quick fix (I have not tried to compile):
import java.util.scanner;
public class Jungmichel3
{
int quizzes;
int midterm;
int finalTestGrade;
int finalNumGrade;
char letterGrade;
public void overallNumGrade()
{
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);
int quiz1 = keyboard.nextInt();
int quiz2 = keyboard.nextInt();
int 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 void letterGrade()
{
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.");
}
}
public static void main(String[] args)
{
Jungmichel3 a = new Jungmichel3();
a.overallNumGrade();
a.letterGrade();
}
}
Pay attention to the differences. These are the main points in a simple
class that you should pay attention to. It should not, however, rely on
class variables as it does, though. There are other ways to fix the
program, but this was the quickest. P.S. I did not truely pay attention to
what was going on inside the methods, so this is not necessarily a
functional program, but the problem you are currently having, should be
fixed.