Computers and Technology
Computers and Technology, 25.04.2020 00:28, kaya1523

Consider the method get Hours, which is intended to calculate the number of hours that a vehicle takes to travel between two mile markers on a highway if the vehicle travels at a constant speed of 60 miles per hour. A mile marker is a sign showing the number of miles along a road between some fixed location (for example, the beginning of a highway) and the current location.
The following table shows two examples of the intended behavior of getHours, based on the int parameters marker1 and marker2.
marker1 marker2 Return Value
100 220 2.0
100 70 0.5
Consider the following implementation of getHours.
public static double getHours (int marker1, marker2)
{
/* missing statement */
return hours;
}
1. Which of the following statements can replace /* missing statement */ so getHours works as intended?
(A) double hours = (Math. abs (marker1) - Math. abs (marker2)) / 60.0;
(B) double hours = Math. abs (marker1 - marker2 / 60.0)
(C) double hours = Math. abs (marker1 - marker2) / 60.
(D) double hours = Math. abs((marker1 - marker2) / 60);
(E) double hours = (double) (Math. abs (marker1 - marker2) / 60);

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 15:20, codie1103
This os integrated the processing power of windows nt with the easy-to-use gui of windows 98. windows 2000 windows 3.11 windows for workgroups windowa millennium edition
Answers: 1
image
Computers and Technology, 23.06.2019 07:10, anika420
If you want to import a picture into a dtp application, what must you do first? draw an image frame. import text. open the folder containing the file. select get image… from the windows menu.
Answers: 2
image
Computers and Technology, 23.06.2019 07:30, cireland
Write a program that inserts the digits of an integer into an array in originalorderfollowed by reverse order. first, promptthe user to enter a positive integer(> 0). determine the number of digits of the integer. create a dynamically allocated integer arrayof a size twice the number of digits. now insert the digits in original order which will occupy half of the array. then, insert the digits in reverse order. finally, output thedigits in thearray. use at least two functions to organize your program.
Answers: 3
image
Computers and Technology, 23.06.2019 12:00, lyn94
Using the list, you can select the number of photos that will appear on each slide. a. theme b. frame shape c. pictures in album d. picture layout
Answers: 1
Do you know the correct answer?
Consider the method get Hours, which is intended to calculate the number of hours that a vehicle tak...

Questions in other subjects:

Konu
English, 26.01.2021 22:10