subject
Computers and Technology, 20.10.2020 04:01 coreen9

Java Eclipse homework. I need help coding this Al’s Last Chance Gas Station sits on route 190 on the edge of Death Valley. There is no other gas station for 200 miles. You are to write a program using a if or Switch to help drivers decide if they need gas. The code should ask the user for the following:

the capacity of the gas tank in gallons
the indication of the gas gauge in percent (full = 1.00, three quarters full = .75, and so on)
the miles per gallon that the car usually gets
The program then writes out “Get Gas” or “Safe to Proceed”, depending upon if the car can cross the 200 miles with the gas remaining in the tank. Include the estimated distance in miles the car should be able to drive before running out of gas.

For a perfect score, improve on the program and make sure to comment your code appropriately.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 18:50
Ais a picture icon that is a direct link to a file or folder
Answers: 1
question
Computers and Technology, 24.06.2019 04:30
Fall protection, confined space entry procedures, controlled noise levels, and protection from chemical hazards are some of the things that contribute to a safe and
Answers: 1
question
Computers and Technology, 24.06.2019 18:30
What is the local portion of the e-mail address below? [email protected] a.) @ b.) biz c.) gumchewer d.) twrigley
Answers: 1
question
Computers and Technology, 24.06.2019 22:10
Function name: poly parameters: int returns: int description: a polynomial of degree n with coefficients a0,a1,a2,a3, . . ,an is the function p(x) = a0+a1x+a2x2+a3 ∗ x3+ . . +an ∗ xn this function can be evaluated at different values of x. for example, if: p(x) = 1+2x+ x2, then p(2) = 1+2 ∗ 2+22 = 9. if p(x) = 1+x2+x4, then p(2) = 21 and p(3) = 91. write a function poly() that takes as input a list of coefficients a0, a1, a2, a3, . . , an of a polynomial p(x) and a value x. the function will return poly(x), which is the value of the polynomial when evaluated at x.
Answers: 3
You know the right answer?
Java Eclipse homework. I need help coding this Al’s Last Chance Gas Station sits on route 190 on th...
Questions
question
Advanced Placement (AP), 29.06.2019 12:30
question
Mathematics, 29.06.2019 12:30