Leasing Cost -We are going to write a code on the following: The...

Question

# Leasing Cost -We are going to write a code on the following: The...

Leasing Cost -We are going to write a code on the following:

The purpose of this assignment is to build an analysis model to explore what-if  scenarios when buying a new car. We will consider two types of vehicles on the market:

• Gasoline powered vehicles that operate solely using gasoline.
• Fully electric vehicles that operate solely on battery-stored power and use no gasoline. The batteries are charged by plugging in to an external power source.

Some of the main considerations that factor into the decision when looking for a car might include cost, convenience, driving experience,  and or environmental reasons.

Of the factors above, we can quantify cost and environmental impact (in terms of CO2 emission). To build a model to help with the decision, we'll begin with the things that can be quantified. Since it is most familiar, let's start with cost.

Considering Leasing Cost

To simplify our model assume leased cars. When leasing a car we only consider:

1. The amount in dollars due at signing
2. The number months for the entire lease
3. The lease monthly cost
4. The mileage allowance per month
5. The cost of the charger if the vehicle is an electrical car

We also consider the price of gas for gasoline-powered vehicles and electricity for electricity-powered vehicles. Because both gasoline and electricity prices vary from time to time, we will obtain this information from the user when we execute the program.

We can break down the total cost into 2~3 parts:

1. Fuel cost: totalMiles / milesPerUnitOfFuel * fuelPrice
2. Lease cost: dueAtSigning + (numberOfMonths*monthlyCost)
3. Charger cost if the vehicle is electric

Then we can find the total cost to lease a car by simply summing all parts together.

Considering Carbon Emissions

Many people choose to buy an electric car, not because of cost but out of concern for the environment. This is a benefit that is difficult to fully capture, but certain things like greenhouse gas emissions can be measured.

Greenhouse gases (GHGs) trap heat in the Earth's atmosphere and are believed to contribute to global climate change. Carbon dioxide (CO2) is the main GHG produced by human activity, and the two major human activities responsible for CO2 emission are electric power generation and combustion of fossil fuels for transportation. We can read a little more about CO2 emission on the EPA website.

Gas-powered car:

According to the EPA, there are 8.887 kg of CO2 released with the combustion of each gallon of gasoline. This is the amount of CO2 coming out the tailpipe of a gas powered vehicle.

Given the formula:

Total emitted CO2 = gallonsOfGasUsed * 8.887 kg/gallon

= totalMiles/milesPerGallon * 8.887 kg/gallon

This means that we can estimate the total CO2 emitted over the 36 months lease of a vehicle.

Assuming that a vehicle consumes 1 gallon of gas for every 34 miles and that the lease allowance milage is 1,000 miles per month, we can compute the number of gallons of gasoline needed to drive an estimated 36,000 miles and multiplying by 8.887kg/gal as follows:

36,000mi/(34 mi/gal) x 8.887 kg/gal = 1,058.82 gal x 8.887kg/gal = 9,409.76kg.

To drive 36,000 miles, the vehicle uses 1,058.82 gallons of gasoline and produces 9,409.76 kg of CO2.

We can do this same calculation for any gas-powered car by plugging in the number of miles driven and the fuel efficiency of the vehicle in miles per gallon.

Electricity-powered car:

According to the EPA's Power Profiler website, 998.4 pounds of CO2 are emitted per mWh on average across the United States.

For this assignment, since we are working with miles and kilograms, we can covert pounds to kilograms.There are about .45kg per pound.

( 998.4 lbs CO2/ MWh * 1MWh/1000Kwh * 0.45kg/lb ) = 0.453 kg/kWh (this data is provided to you in Fuel.java).

Now, let us figure out how much CO2 is emitted in generating the electricity to charge the battery of an electricity-powered car over a 36 months lease by estimating the total energy for battery charging needed to drive 36,000 miles.

A very similar formula can be used for electricity car here:

Total CO2 = kW⋅hOfElectricityUsed * 0.453 kg/kW⋅h

= totalMiles/milesPerKW⋅h * 0.453 kg/kW⋅h

Assuming the vehicle consumes 1 kW⋅h for every 3 miles and that the lease allowance mileage is 1,000 miles per month.

For 3 years, there are 36 months. We can estimate there are a total of 36,000 miles during the lease. To find the total electricity used, we do 36,000 / (3 miles/kW⋅h) = 12,000 kW⋅h

Total CO2 emissions  = 12,000 * 0.453 kg/kW⋅h = 5436 kg of CO2

Solved by verified expert

sectetur adipiscing elit. Nam lacinia pulvinar tortor nec

10,000 step-by-step explanations

## Step-by-step explanation

• sectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit a
• sectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tor
• sectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit
• sectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. L
• sectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibu
• sectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. F
• sectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio.