Multiple Choice
Consider the following code that will assign a letter grade of 'A', 'B', 'C', 'D', or 'F' depending on a student's test score. if (score >= 90) grade = 'A';
If (score >= 80) grade = 'B';
If (score >= 70) grade = 'C';
If (score >= 60) grade = 'D';
Else grade = 'F';
A) This code will work correctly in all cases
B) This code will work correctly only if grade >= 60
C) This code will work correctly only if grade < 60
D) This code will work correctly only if grade < 70
E) This code will not work correctly under any circumstances
Correct Answer:

Verified
Correct Answer:
Verified
Q3: In order to compare int, float and
Q13: Assume that count is 0, total is
Q15: For the questions below, assume that boolean
Q17: Every Interator<br>A) has a hasNext( ) method<br>B)
Q17: An if statement may or may not
Q20: Given the nested if-else structure below, answer
Q21: String s1 is said to overlap String
Q22: What is wrong, logically, with the following
Q23: For the questions below, assume that boolean
Q28: The statement {} is a legal block.