Computers and Technology
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));
}
}

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 15:00, 2alshawe201
The three logical operators used to write compound conditions are "and," "or," and "not." a: true b: false
Answers: 2
image
Computers and Technology, 22.06.2019 21:00, jennifer7037
Ulia is planning to attend the same private four-year college her parents attended. she wants to save at least $18,000 in four years to contribute to her college education. which monthly deposit amounts can julia use to achieve her goal? check all that apply.
Answers: 2
image
Computers and Technology, 24.06.2019 14:00, ameliaxbowen7
Which computer tools allow you to communicate with coworkers, family, and friends
Answers: 1
image
Computers and Technology, 24.06.2019 23:00, amandajennings01
Why is it preferable to code web pages in html format? a. to create more lines code b. to apply general formatting rules c. to display properly as search results in all browsers d. to add meaning to the document
Answers: 1
Do you know the correct answer?
Write a method so that the main() code below can be replaced by the simpler code that calls method...

Questions in other subjects: