CPSC 120B -- Assignment #1

The Economics of Hybrid Cars
Due Friday, September 22, 2005 by 4 p.m.

Given the recent spike in the cost of gas prices, you may be considering buying a hybrid car.  We all know that hybrids use less gas, but they also cost more to initially purchase. For this assignment you will write a JAVA program to help you make an informed decision about the economics of owning a hybrid vehicle.  (Note- this program may calculate the bottom line for your checkbook, but it does not address the broader ethical questions surrounding the use of  energy consumption.    Saving the planet:   Priceless)

According to recent surveys, Hybrid owners report an average improvement of 9 miles per gallon in feul economy.    A quick survey of the manufacturer's suggested retail prices reveals that consumers pay an average of $5,000 more for a hybrid vehicle than a comparably equipped gasoline-only vehicle.    Moreover, the government is offering tax incentives ($2400) to encourage people to make the transition from gas to hybrid.    In order to balance the savings in fuel economy with the cost of ownership, one must also make some assumptions about the cost of gas and the driving profile of the potential buyer.

The program should meet the following requirements:

Input to the program will be:

Values to compute:

Assumptions:

Output Your output must be nicely formatted (similar to that below but you should choose your own way of formatting) and must include the following information (all appropriately labeled with white space):


Sample Output  A frun of your program may look something like the following :

How many miles do you drive per month?  _____
What is the anticipated price of gas ? _____
What is the anticipated gas mileage for your new car? _____
How big is the gas tank in your new car? ____



Hybrid Car Savings Analysis
===========================
Over the course of the year, you will spend $_____ on gas
You'll need to stop at the gas station approximately once every ____ weeks

Hybrid owners report getting an average of ___ more miles per gallon and paying $______ more.
Fortunately, there is currently a tax credit of ______

Under these conditions:
You will save ____ per year
You will only have to fill up approximately once every _____ weeks
It will take you approximately ______ years to balance the cost of ownership with the savings.

Note: the blanks in the example above will be filled with actual numbers

Requirements:

Academic Integrity Reminder!!! Programming assignments are to be your own work. You may get help on the specifics of the assignment from no one except the instructor. You may not show your program to anyone or look at anyone else's program or share ideas with anyone about how to write the program.