The program below is the answer to Deitel’s Java How to Program (9th Edition) Chapter 2 Exercise 2.35.

Question: Research several car-pooling websites. Create an application that calculates your daily driving cost, so that you can estimate how much money could be saved by car pooling, which also has other advantages such as reducing carbon emissions and reducing traffic congestion. The application should input the following information and display the user’s cost per day of driving to work:

a) Total miles driven per day.
b) Cost per gallon of gasoline.
c) Average miles per gallon.
d) Parking fees per day.
e) Tolls per day.

Click here to see other answers to Java How to Program | Click here to see the same program in C.

Write A Comment