subject
Computers and Technology, 26.12.2019 01:31 chavice

Write a method so that the main() code below can be replaced by the simpler code that calls method original main():

public class calcmiles {
public static void main(string [] args) {
double milesperhour;
double minutestraveled;
double hourstraveled;
double milestraveled;
milesprhour = scnr. nextdouble();
minutestraveled = scnr. nextdouble();
hourstraveled = minutestraveled / 60.0;
milestraveled = hourstraveled * milesperhour;
system. out. println("miles: " + milestraveled);
}
}
import java. util. scanner;
public class calcmiles {
/* your solution goes here */
public static void main(string [] args) {
scanner scnr = new scanner(system. in);
double milesperhour;
double minutestraveled;
milesperhour = scnr. nextdouble();
minutestraveled = scnr. nextdouble();
system. out. println("miles: " + mphandminutestomiles(milesperhour, minutestraveled));
}
}

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 19:00
When keyboarding, if you want to be fast and accurate you should return your hands on home row with your fingers relaxed and your eyes on the text use only your index fingers to hunt and peck keep your fingers stiff and your eyes on the keys slouch in your chair and keep your fingers hovering over all of the keys
Answers: 2
question
Computers and Technology, 22.06.2019 14:30
The “rule of 72” is used to approximate the time required for prices to double due to inflation. if the inflation rate is r%, then the rule of 72 estimates that prices will double in 72/r years. for instance, at an inflation rate of 6%, prices double in about 72/6 or 12 years. write a program to test the accuracy of this rule. for each interest rate from 1% to 20%, the program should display the rounded value of 72/r and the actual number of years required for prices to double at an r% inflation rate. (assume prices increase at the end of each year.)
Answers: 1
question
Computers and Technology, 23.06.2019 20:00
How much current flows through the alternator brushes? a. 2–5 a b. 25–35 a, depending on the vehicle c. 5–10 a d. 10–15 a
Answers: 2
question
Computers and Technology, 25.06.2019 04:00
Use the wrap text icon to modify which graphic appears in the front of layered images modify the picture effects change the way text is wrapped around an object apply wordart to the text
Answers: 1
You know the right answer?
Write a method so that the main() code below can be replaced by the simpler code that calls method...
Questions
question
Mathematics, 29.04.2021 23:50
question
Chemistry, 29.04.2021 23:50
question
Mathematics, 29.04.2021 23:50