subject

A teacher put three bonus questions on a test and awarded 5 extra points to anyone who answered all three bonus questions correctly and no extra points otherwise. Assume that the boolean variables bonusOne, bonusTwo, and bonusThree indicate whether a student has answered the particular question correctly. Each variable was assigned true if the answer was correct and false if the answer was incorrect. Which of the following code segments will properly update the variable grade based on a student's performance on the bonus questions? I. if (bonusOne && bonusTwo && bonusThree)grade += 5;
II. if (bonusOne || bonusTwo || bonusThree)grade += 5;
III. if (bonusOne)grade += 5; if (bonusTwo)grade += 5; if (bonusThree)grade += 5;

a. I only
b. II only
c. III only
d. I and III
e. II and III

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 09:40, vanessacasillas452
In the lab, which of the following displayed a list of all installed services and included a description of the service, the current state, and whether the service started automatically or manually? a. the services manager b. the applications summary c. the recommended services d. list the safe services list
Answers: 2
image
Computers and Technology, 22.06.2019 11:10, 17795
Look at the far left lane in the picture. explain what the red car is doing and what it needs to do to travel safely.
Answers: 2
image
Computers and Technology, 23.06.2019 10:00, serenityharmon1
Hey i just logged on and one of the moderators deleted a bunch of my answers to questions, even though the answers were right and the people it doesn't make sense but if anyone wants to talk about anything just message me lol (this is super random lol)
Answers: 1
image
Computers and Technology, 23.06.2019 13:00, dimondqueen511
Which one of the following voltages should never be measured directly with a vom? a. 1200 v b. 500 v c. 800 v d. 100v
Answers: 2
You know the right answer?
A teacher put three bonus questions on a test and awarded 5 extra points to anyone who answered all...

Questions in other subjects:

Konu
Mathematics, 12.09.2019 05:30
Konu
Chemistry, 12.09.2019 05:30
Konu
Mathematics, 12.09.2019 05:30