subject

Write a method so that the main() code below can be replaced by simpler code that calls method calcMilesTraveled(). Original main(): public class CalcMiles {
public static void main(String [] args) {
double milesPerHour = 70.0;
double minutesTraveled = 100.0;
double hoursTraveled;
double milesTraveled;
hoursTraveled = minutesTraveled / 60.0;
milesTraveled = hoursTraveled * milesPerHour;
System. out. println("Miles: " + milesTraveled);
}
}
1 import java. util. Scanner;
2
3 public class CalcMiles (
4
5 /" Your solution goes here ./
6 private double calcMilesTraveled(double milesPertour, double ninsTraveled)
7 double hoursTraveled
8 double milesTraveled;
9
10 hoursTraveled mibsTraveled 60.8
11 milesTraveled hoursTraveled milesperhour
12
13 return milesTraveled;
14
15
16 public static void main(String 0] args)
17 double milesPerhour 70.0;
18 double minutesTraveled 100.0
19
20 System. out. printin("Miles: mphAndMinutesToMiles(milesPerHour, minutesTraveled))i

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 14:50
Drag each label to the correct location on the image list the do’s and don’ts of safeguarding your password. a. keep yourself logged in when you leave your computer.b. don’t write your password down and leave it where others can find it.c. share your password with your friends.d.each time you visit a website,retain the cookies on your computer.e. use a long password with mixed characters.1. do's 2. don'ts
Answers: 2
question
Computers and Technology, 22.06.2019 15:30
When creating a budget, log fixed expenses before income. after income. after savings. at the top.
Answers: 1
question
Computers and Technology, 23.06.2019 02:00
Read this excerpt from helen keller’s autobiography, the story of my life. have you ever been at sea in a dense fog, when it seemed as if a tangible white darkness shut you in, and the great ship, tense and anxious, groped her way toward the shore with plummet and sounding-line, and you waited with beating heart for something to happen? i was like that ship before my education began, only i was without compass or sounding-line, and had no way of knowing how near the harbour was. "light! give me light! " was the wordless cry of my soul, and the light of love shone on me in that very hour. . the morning after my teacher came she led me into her room and gave me a doll. the little blind children at the perkins institution had sent it and laura bridgman had dressed it; but i did not know this until afterward. when i had played with it a little while, miss sullivan slowly spelled into my hand the word "d-o-l-l." i was at once interested in this finger play and tried to imitate it. when i finally succeeded in making the letters correctly i was flushed with childish pleasure and pride. running downstairs to my mother i held up my hand and made the letters for doll. i did not know that i was spelling a word or even that words existed; i was simply making my fingers go in monkey-like imitation. in the days that followed i learned to spell in this uncomprehending way a great many words, among them pin, hat, cup and a few verbs like sit, stand and walk. based on this excerpt, which words best describe helen keller?
Answers: 2
question
Computers and Technology, 23.06.2019 18:00
Which is a possible benefit of having a good credit history? having a checking account low interest rate on a car loan high interest rate on a credit card offer bankruptcy
Answers: 1
You know the right answer?
Write a method so that the main() code below can be replaced by simpler code that calls method calcM...
Questions
question
English, 20.01.2021 03:50
question
Mathematics, 20.01.2021 03:50
Questions on the website: 13722361