1) CarPool (for problem 1)

Research several car pool 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 emission and reducing traffic congestion. The application should input the following information:

i.                     Total miles driven per day.

ii.                   Cost per gallon of gasoline.

iii.                  Average miles per gallon.

iv.                 Parking fees per day .

v.                   Tolls per day.

I have done some but i need some more helop as I am late with my project.

Miles driven in one week:

4.5
4.3
2.3
3.5
5.6
4.4
4.5

Gas price(fixed)

2.54

Average galoncostofgasoline( fixed)
24

parking per day(Fixed)
7.21


Toll per day(fixed) 
3.50


calss DayliSavingCost

DailySavings 

Savingsongas 

1) A class with a main method that allows you to 'start' the application
a) This class should print out and read in the prompts for each peice of data that you will gather
b) You need to have a method that takes in all the peices of data and calculates what the savings will be and return the result

 Class Application

    public static void main(String[] args){


     print  "Welcome to the cost savings calculator"

    print "What is your daily travel distance?"

    read from stdin, cast to double, then add to data member

        double savings = getTotalSavings(dailyDistance, parkingPerDay, tollPerDay, averageMilesPerGallon, costOfGasoline);

    }

    private double getTotalSavings(dailyDistance, parkingPerDay, tollPerDay, averageMilesPerGallon, costOfGasoline){

         //fill in this method

     }

   }
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.