I have debug the code but all that i still getting is the


Below is the code that I have all that I got is my name in the output. According to the instructions I am supposed to click on RUN from the menu bar. I have debug the code but all that I still getting is the print of my name. I need to get the average and the letter grade.

import static java.lang.System.out;

import java.util.Scanner;

public class AverageGrade {

public static void main(String[] args) {

double TestScore1;

double TestScore2;

double TestScore3;

String name1;

Scanner Keyboard = new Scanner(System.in);

System.out.print("Cesar");

name1 = Keyboard.nextLine();

System.out.println(92);

TestScore1 = Keyboard.nextInt();

System.out.println(75);

TestScore2 = Keyboard.nextInt();

System.out.println(68);

TestScore3 = Keyboard.nextInt();

double average = ((TestScore1 + TestScore2 + TestScore3)/3);

out.println(name1);

out.println("The average score of the 3 tests is: " + average);

if (average>90)

{

System.out.println("You got an A");

}

else if (average>=80)

{

System.out.println("You got a B");

}

else if (average>=70)

{

System.out.println("You got a C");

}

else if (average>=60)

{

System.out.println("You got a D");

}

else if (average<60)

{

System.out.println("You got an F");

}

}

}

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: I have debug the code but all that i still getting is the
Reference No:- TGS02604080

Now Priced at $5 (50% Discount)

Recommended (98%)

Rated (4.3/5)