Starting from:
$35

$29

Programming Assignment#2 Car-Pool Savings Calculator Solutio

Research several car-pooling websites.
Write an application named MyCarPool2 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 and display the user’s cost per day of driving to work with and without car-pooling.

Total miles driven per day.
Cost per gallon of gasoline.
Average miles per gallon.
Parking fees per day.
Tolls per day.
Number of passengers (sharing the same vehicle).
Compute the saving per day (divide daily cost by the number of passengers), week (5 days), month (22 days), and year (260 days) if you car-pool with the number of passengers entered above.




Use System.out.printf statements to print your output.
Include in your program output a report header with your name, class and section, and current date.
Include appropriate labels, indentions, and alignments.
Make sure you document your class and code.
Attach (do not turn in any hardcopy) via BlazeView the following items:
A single typed page with your name, class, date, and program title. The report (named MyReport2) should include what you learned from the programming assignment, problems faced, skills learned, and your observations.
Name the class that contains the main method (MyCarPool2).
Attach MyCarPool2.java NOT MyCarPool2.class

Zip all your files into single one. Name it with your last name followed by the program#.
For example, Fares2

Make sure that your program is well documented and readable.
The output is well labeled and aligned
Sample input

Welcome to the Daily Driving Cost calculator
Enter the number of miles you drive per day: 25
Enter the cost per gallon of gas (ie., 2.25): 2.45
Enter average miles per gallon of gas: 21.5
Enter the parking fees per day: 5.5
Enter the tolls per day : 1.75
Enter the passengers: 3




Sample output


****************** Car Pooling Report **************************
Name: John Smith
Course: CS1301
Date: 8/28/2015
****************************************************************

Daily Miles Driven: 25
Cost per gallon: 2.45
Average Miles Per Gallon: 21.50
Parking fees: 5.50
Toll cost: 1.75
Number Of Passengers: 3

One Passenger Daily Cost: 10.10
Daily Savings: 6.73
Weekly Savings: 33.66
Monthly Savings: 148.12
Annual Savings: 1750.47


****************** Have a nice day **************************

More products