Shen is driving on the highway. He begins the trip with 14 galons of gas in...
Stan Moneymaker needs 15 gallons of gasoline to top off his automobile's gas tank. If he drives an extra eight miles (round trip) to a gas station on the outskirts of town, Stan can save $0.10 per gallon on the price of gasoline. Suppose gasoline costs $3.00 per gallon and Stan's car gets 25 mpg for in-town driving. Each mile that Stan drives creates one pound of carbon dioxide. Each pound of CO2 has a cost impact of $0.02 on...
Gas mileage actually varies slightly with the driving speed of a car (as well as with highway vs. city driving). Suppose your car averages 31 miles per gallon on the highway if your average speed is 54 miles per hour, and it averages 29 miles per gallon on the highway if your average speed is 69 miles per hour. Answer parts (a) and (b) below. a. What is the driving time for a 3000-mile trip if you drive at an...
Write a program to compute miles per gallon of a car, over a long trip. The car begins the trip with a full tank, and each fuel stop along the way fills the tank again. You will not do any math, arithmetic, or computations in the main() function. All output will be displayed from the main() function. Start the program by asking the user for the starting odometer reading. All odometer readings will be in whole miles only. The fuel...
Stan Moneymaker needs 12 gallons of gasoline to top off his automobile's gas tank. If he drives an extra eight miles (round trip) to a gas station on the outskirts of town, Stan can save $0.15 per gallon on the price of gasoline. Suppose gasoline costs $3.50 per gallon and Stan's car gets 25 mpg for in-town driving. Each mile that Stan drives creates one pound of carbon dioxide. Each pound of Co, has a cost impact of $0.03 on...
In JAVA In this assignment you will use a class Car to represent a car that travels to various destinations. Your car has a fuel economy rating of 32.3 miles per gallon. The gas tank holds 19.5 gallons. Your program will need to simulate two trips: 1) BC to Yosemite Valley, and 2) BC to Washington, D.C.. For each trip you will start with a full tank of gas. The output should look as follows. Trip one: Bakersfield College to...
Code to be written in JAVA please In this assignment you will use a class Car to represent a car that travels to various destinations. Your car has a fuel economy rating of 32.3 miles per gallon. The gas tank holds 19.5 gallons. Your program will need to simulate two trips: 1) BC to Yosemite Valley, and 2) BC to Washington, D.C.. For each trip you will start with a full tank of gas. The output should look as follows....
Mr. Carr derives a lot of pleasure from driving under the wide blue skies. For the number of miles x that he drives, he receives Utility U(x) = 500x – x2 Once he drives beyond a certain number of miles weariness kicks in and the ride becomes less and less enjoyable. His car gives him a decent highway mileage of 25 miles per gallon. But paying for gas (or paying in general) induces disutility shown by U(y) = -1000y, where...
9. Solve. If using rrefon calculator to solve. Write the initial matrix, final matrix, and the solution. 10. Show whether (2,1,0,1) satisfies the system below. The order is (x, y, z, w). x - y + z = -4 2x - 3y + 4z = -15 (5x + y - 2z = 12 x+y+Z+W=4 -x +2y +z = 1 2x + 3y + z-w=6 -2x+y - 22 +2w = -1 11. A truck gets 16 mpg in the city and...
Please show steps:
Question 3* (a) Suppose it costs $120 plus 20 cents a mile to rent a car for a week. Let A(n) represent the total cost for renting the car if you drive for a total of n miles. Develop a dynamical system (i.e., the difference equation) for A(n+1) in terms of A(n). Solve the equation for A(n). (b) Let A(n) be the number of gallons of gas left in a car after driving n miles. The car...
IN C++ Programming Problem 1: Write a program that calculates a truck's gas mileage and cost for a road trip. Be creative with the output, think of it as a “report”, give it a title at the top and use formatting where appropriate. The program should set the number of gallons of gas that the truck can hold to 31, and the number of miles it can be driving on a full tank to 651. The program should display the...