Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

Name: Moazam Munir Class: CSC-122-01 Date:10/18/21 XXXXXXXXXXPart 1 multiple choice questions section 9: consider the following code that will assign a letter grade of ‘A’,’B’,’C’,’D’, or ‘F’...

1 answer below »
Name: Moazam Muni
Class: CSC-122-01
Date:10/18/21
XXXXXXXXXXPart 1 multiple choice questions section
9: 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 co
ectly in all cases
B. This code will work co
ectly only if grade >=60
C. This code will work co
ectly only if grade >60
D. This code will work co
ectly only if grade>70
E. This code will not work co
ectly under any circumstances
So, for this question I answered A because the only thing we have to change was letter to see other grade but co
ect answer for this question is D and the reason why D is right answer because if u take a look at hole code there is a sign.
16: if x is cu
ently 25 and y is 8, what will be the value of x and y as a result of the following code?
X+=y++
A. X=34, y=9
B. X=33, y=9
C. C=25, y=8
D. X=33, y =8
25: A cast is required in which of the following situations?
A. Using charAt to take an element of String and store in cha
B. Storing an int a float
C. Storing a float in double
D. Storing a float in an int
E. All of the above require casts
Answered Same Day Oct 12, 2021

Solution

Anurag answered on Oct 12 2021
128 Votes
Name: Moazam Muni
Class: CSC-122-01
Date:10/18/21
Part 1 multiple choice questions section
9: 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 co
ectly in all cases
B. This code will work co
ectly only if grade >=60
C. This code will work co
ectly only if grade >60
D. This code will work co
ectly only if grade>70
E. This code will not work co
ectly under any circumstances
So, for this question I answered A because the only thing we have to change was letter to see other grade but co
ect answer for this question is D and the reason why D is right answer...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here