Question: What is wrong with the following code? public static char grade ( int score ) { if ( score > = 9 ) { return

What is wrong with the following code?
public static char grade(int score)
{
if (score >=9)
{
return 'A';
}
else if (score >=8)
{
return 'B';
}
else if (score >=6)
{
return 'C';
}
else if (score >4)
{
return 'D';
}
else if (score <4)
{
return 'F';
}
}
Group of answer choices
Invalid parameter variable type
No return statement for all logic paths
Invalid argument in return statements
Illegal parameter variable name

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!