Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

As noted my announcement we will be working on a semester long programming project. Chapters 2, 3, 4, 5, and 6 will have components of

As noted my announcement we will be working on a semester long programming project. Chapters 2, 3, 4, 5, and 6 will have components of the project associated with them. The project is the development of a program that will calculate the cost of buying and owing a car The user will enter information about the boat and your program will calculate and display the costs of buying and owning that car. Each component of the project will require you to demonstrate that you have mastered the concepts of the associated chapter. Each component will build on the previous one. In the later chapters you will be replacing code from earlier chapters with more sophisticated code. When I was expecting my child my older (she has children my age) sister who had raised four great children gave me some advise about parenting. She said it was important to always give your children choices. She said it was equally important to know that sometimes those choices should be "do what I tell you to do or I will punish you". In this assignment, the Comprehensive Programming Project, "do what I tell you to do or I will punish you", that is follow the specification of the assignment or no points. I do not give partial credit on this or any other programming assignment. I provide you with very detailed and specific instructions re: the Comprehensive Programming Project. These instructions cover the input, processing and output of information. I provide sample output for a given set of input data (Mickey Mouse buys a $100,000 Rolls Royce) - your program is to work for any set of input data (e.g. Minnie Mouse buys a $20,000 VolksWagon). You are to follow my instructions. Use the variables names and types I specify, get the information from the user as I specify, make the calculations as I specify and output the information as I specify, etc. The specifications for the Chapter 2 Comprehensive Programming Project are: ComprehensiveProblem_Chapter2_Spring_2018.pdfPreview the document Don't be intimidated by the project. Chapter 2 of the project looks very long and sophisticated. While the program you will write is a bit long (it's the most typing you will do in any of the chapters) it's really very simple steps - getting input from the user, some simple calculations and output (you will do a lot of copy and paste in the code for output). Use only what you have learned in chapter 2 (and of course 1) in your solution - no loops, if statements etc - just simple input from the keyboard, variables, calculations and output to the screen.

CTIM157: SPRING 2018 PROF. BROWN-SEDERBERG COMPREHENSIVE PROBLEM CHAPTER: 2 FILE NAME: CPC2_S2018_your initials.java Summary: A program that will calculate the cost of a gasoline/diesel powered vehicle. Description: You will be working on a comprehensive problem throughout the semester. The program you will be writing will calculate the cost of a vehicle for the user and will become more complex as the semester progresses. Your solution to the problem will incorporate the Java capabilities you learn with each chapter. Chapter 2 Specifications: 1. You are to ask for and get from the user the following information (in the order specified below) and save it in the the variables as listed (name and type). Declare all variables at the beginning of your program. String firstName String lastName int vehicleYear String vehicleMake String vehicleModel double vehiclePrice double interestRate double downPayment double milesPerGallon double costGallonFuel int milesPerYear 2. Calculate and save all information in the variable as specified by type and name. Assume that the user will be keeping the vehicle for 5 years and will have a 5 year loan. The additional variables you need to declare are in italic and bold: a. Salvage value of the vehicle at 10% of the vehiclePrice (double salvageValue). b. Amount of the monthly loan payment (double monthlyLoanPayment) using the following formula: monthlyLoanPayment = (vehiclePrice - downPayment) * ((interestRate/12) /(1 - Math.pow(1 + (interestRate/12), -(5 * 12)))); c. Total amount paid over the life of the loan (double totalLoanPayments) d. Total interest paid over the life of the loan (double totalInterestPaid) e. Annual repairs and maintenance calculated as follows: 1% of vehiclePrice in year 1 (double repairMaintenanceYear1) 2% of vehiclePrice in year 2 (double repairMaintenanceYear2) 3% of vehiclePrice in year 3 (double repairMaintenanceYear3) 4% of vehiclePrice in year 4 (double repairMaintenanceYear4) 5% of vehiclePrice in year 5 (double repairMaintenanceYear5) f. Total repairs and maintenance cost (double totalRepairMaintenance) g. Annual depreciation calculated under Double Declining Balance: N.B. The Useful Life of Asset in Years of the vehicle = 5. N.B. Depreciation is calculated at the end of the year. N.B. You must declare the variable double bookValue. N.B. bookValue = vehiclePrice - depreciation taken in all prior years. N.B. Double Declining Balance Depreciation is calculated for each year using the following formula: bookValue * (2 * 100% / Useful Life of Asset in Years) depreciation in year 1 (double depreciationYear1) depreciation in year 2 (double depreciationYear2) depreciation in year 3 (double depreciationYear3) depreciation in year 4 (double depreciationYear4) depreciation in year 5 (double depreciationYear5) h. Total depreciation (double totalDepreciation) i. Annual excise tax calculated as follows: 90% * vehiclePrice/1000 * 25 (double exciseTaxYear1) 60% * vehiclePrice/1000 * 25 (double exciseTaxYear2) 40% * vehiclePrice/1000 * 25 (double exciseTaxYear3) 25% * vehiclePrice/1000 * 25 (double exciseTaxYear4) 10% * vehiclePrice/1000 * 25 (double exciseTaxYear5) j. Total excise tax (double totalExciseTax) k. Annual insurance calculated as follows: N.B. bookValue = vehiclePrice - depreciation taken in all prior years. N.B. Insurance is calculated at the beginning of the year. vehiclePrice * 1% + bookValue * 2% (double insuranceYear1) vehiclePrice * 1% + bookValue * 2% (double insuranceYear2) vehiclePrice * 1% + bookValue * 2% (double insuranceYear3) vehiclePrice * 1% + bookValue * 2% (double insuranceYear4) vehiclePrice * 1% + bookValue * 2% (double insuranceYear5) l. Total insurance (double totalInsuranceCost) m. Annual cost of fuel (double annualFuelCost) n. Total cost of fuel (double totalFuelCost) o. Annual inspection(int ANNUALINSPECTIONCOST) this is a constant value of $29 p. Total inspection cost (int totalInspectionCost) q. Biannual registration cost (int BIANNUALREGISTRATIONCOST) this is a constant value of $50 charged in a biannual basis (every other year) starting in the first year of ownership. r. Total registration cost (int totalRegistrationCost) s. Plate cost (int PLATECOST) this is a onetime cost charged in the first year of ownership it is a constant value of $50 t. Total plate cost (int totalPlateCost) Chapter 2 Output: 1. Your program is to output to the screen as specified below (output values will depend on input values). Print dollar signs ($) when appropriate. Print all dollar values to two decimal points. Print all decimal values to four decimal points. Please enter your first name: Mickey Please enter your last name: Mouse Please enter the year of the vehicle: 2013 Please enter the make of the vehicle: Porsche Please enter the model of the vehicle: Carrera Please enter the price of the vehicle: 100000 Please enter the interest rate on your loan: .07 Please enter the down payment you will make: 20000 Please enter the average miles per gallon: 10 Please enter the average cost of gas per gallon: 3.5 Please enter the average miles driven per year: 12000 Cost analysis prepared for: Mickey Mouse. The costs of buying and owning a 2013 Porsche Carrera are as follows: Purchased for $100000.00 with a downpayment of $20000.00 and an interest rate of 0.0700 on a loan of $80000.00: The monthly loan payment will be $1584.10 per month. Year 1 annual additional costs will be: Depreciation: $40000.00 Excise Tax: $2250.00 Fuel: $4200.00 Inspection Cost: $29 Insurance: $3000.00 Interest: $3009.15 Plate: $50 Registration: $50 Repair and Maintenance: $1000.00 Year 2 annual additional costs will be: Depreciation: $24000.00 Excise Tax: $1500.00 Fuel: $4200.00 Inspection Cost: $29 Insurance: $2200.00 Interest: $3009.15 Plate: $0 Registration: $0 Repair and Maintenance: $2000.00 Year 3 annual additional costs will be: Depreciation: $14400.00 Excise Tax: $1000.00 Fuel: $4200.00 Inspection Cost: $29 Insurance: $1720.00 Interest: $3009.15 Plate: $0 Registration: $50 Repair and Maintenance: $3000.00 Year 4 annual additional costs will be: Depreciation: $8640.00 Excise Tax: $625.00 Fuel: $4200.00 Inspection Cost: $29 Insurance: $1432.00 Interest: $3009.15 Plate: $0 Registration: $0 Repair and Maintenance: $4000.00 Year 5 annual additional costs will be: Depreciation: $5184.00 Excise Tax: $250.00 Fuel: $4200.00 Inspection Cost: $29 Insurance: $1259.20 Interest: $3009.15 Plate: $0 Registration: $50 Repair and Maintenance: $5000.00 The total costs will be: Total vehicle cost: $115045.75 Total depreciation cost: $92224.00 Total excise tax cost: $5625.00 Total fuel cost: $21000.00 Total inspection cost: $145 Total insurance cost: $9611.20 Total interest cost: $15045.75 Total plate cost: $50 Total registration cost: $150 Total repair and maintenance cost: $15000.00

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases And Python Programming MySQL MongoDB OOP And Tkinter

Authors: R. PANNEERSELVAM

1st Edition

9357011331, 978-9357011334

More Books

Students also viewed these Databases questions

Question

2. When is the job to be completed?

Answered: 1 week ago

Question

What are the steps involved in the HR planning process?

Answered: 1 week ago