subject
Computers and Technology, 25.12.2020 17:30 mfin11

Consider the following code segments, which are each intended to convert grades from a 100-point scale to a 4 point scale and print the result. A grade of 90 or above should yield a 4.0, a grade of 80 to 89 should yield a 3.0, grade of 70 to 79 should yield a 20, and any grade lower than 70 should yield a 0.0 Assume that grade is an int variable that has been properly declared and initialized Code Segmenti double points = 0.0; ir (grade > 89) points 4.0; else if (grade > 79) points + 3.0; else if (grade > 69) points += 2.0; else points + 0.0; System. out. println (points); Code Segment II double points - 0.0; if (grade > 89) points + 4.0; if (grade > 79) grade 3.0; if (grade > 69) points - 2.0; if (grade points + 0.01 System. out. println (points); Which of the following statements correctly compares the values printed by the two methods? A. The two code segments print the same value only when grade is below 80. B. The two code segments print the same value only when grade is 90 or above or grade is below 80. C. The two code segments print the same value only when grade is 90 or above. D. Both code segments print the same value for all possible values of grade E. The two code segments print different values for all possible values of grade.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 20:50
What does operator overloading allow you to do?
Answers: 2
question
Computers and Technology, 22.06.2019 16:20
It policy compliance and emerging technologies respond to the following: propose at least three control measures that organizations need to put in place to ensure that they remain complaint with emerging technologies and in a continually changing it environment. examine the correlation of effective configuration management and change control procedures to remain compliant with emerging technologies and it security changes.
Answers: 2
question
Computers and Technology, 23.06.2019 18:30
The computers in the sales department did not have enough data storage capacity to contain all the information the department needed to store, and it was taking a long time for team members to access the data they needed. to fix the problem, the technician installed new, larger hard drives on all the computers.
Answers: 1
question
Computers and Technology, 24.06.2019 04:10
Write a program that reads a set of floating-point values. ask the user to enter the values, then print • the average of the values. • the smallest of the values. • the largest of the values. • the range, that is the difference between the smallest and largest. of course, you may only prompt for the values once.
Answers: 3
You know the right answer?
Consider the following code segments, which are each intended to convert grades from a 100-point sca...
Questions
question
Mathematics, 28.07.2019 16:20
Questions on the website: 13722360