! Largest Cloud Bitcoi... QUESTION 1 isPerfectScore (quizScore 10): The above st
ID: 3870015 • Letter: #
Question
! Largest Cloud Bitcoi... QUESTION 1 isPerfectScore (quizScore 10): The above statement can also be written as isPerfectScore = 10; Oif (isPerfectScores true) quizScore 10; if (quizScore : 10) isPerfectScore true: else isPerfectScore false: None of the above. The original statement is illegal QUESTION 2 Which of the following data types cannot be the argument tested in a switch statement? o int o char O double O String QUESTION 3 Identify the error in the following code segment. if (quiz5core as 10) System.out printin The score is perfect") The if-statement should be indented to the right. O When quizScore equals ten, nothing is printed The boolean expression should be if (quiz5core 10)- O There is no errorExplanation / Answer
question 1)
The ANswer for the question isPerfectscore =(quizscore==10) is given below;
the above given statement can be written as
if (quizscore==10)
isPerfectscore = true;
else
isPerfectscore = false;
so Option c is correct answer
Explanation:
the remaining all options are wrong because
the first option isPerfectscore=10 it does not satisfy the given condition and it dont even match for it.
coming to second option also it does not satisfy the given condition and it dont even match for it but where as coming to third option it Exactly matches the given condition so it is true and option 4 is none of the above so we no need to considr this option.
question 2)
the answer for this question is Option c ;i.e double is the correct answer.
Explanation:
double data type cannot be argument tested in switch statement because switch statement does not allow doble, long, float boolean, so in our given options we have only double so double is our answer
coming to other options we have int, char and string so this are wrong answer because those are thedata types that can be argument tested in switch statement.
question 3)
in the given code
if(quizScore == 10)
System.out.println("the score is perfect");
The Answer is option D;i.e there is no error
Explanation:
the given code has no errors so this option D is correct coming to other options we have the if-statement should be indented to the right is wrong option the if condition can be anywhere
and the second option is also wrong because the if condition is executed and output is printed and
coming to third option the given expression is wrong so option D is correct.
question 4)
Explanation:
here option B is correct because it is exactly same as the given question only the {,} are added to the code that's it.
Hope This Helps, if you have any doubts Please comment i will get back to you, thank you and please thumbs up
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.