Question: C++ Only please. Absolutely No Global Variable Declarations - Means Automatic Zero Checkpoints 1) Include name, e-mail, and lab# as comments in the code and

C++ Only please.

C++ Only please. Absolutely No Global Variable Declarations - Means Automatic ZeroCheckpoints 1) Include name, e-mail, and lab# as comments in the code

Absolutely No Global Variable Declarations - Means Automatic Zero Checkpoints 1) Include name, e-mail, and lab# as comments in the code and also include code to output this information to the output. 2) Minimum of three (3) comments in each function: Pre: (name and description of each parameter), Post: (what is being returned), and Purpose:(what the function does). Pre comments must indicate when a parameter is a reference variable. 3) User defined constants for property tax rate, cost of utilities, and cost of insurance. Use non-global memory constant for percent of down payment. 4) Use exactly one function which must be called from main() for all input. Use C++ Style with prototype before main() and the function definition after main(). 5) Write a calculation function which must be called from main() which handles all calculations. This function needs to contain a call to exactly one sub-function to calculate the down payment, amount of the loan and monthly mortgage payment. Use C++ Style with prototype before main() and the function definition after main(). 6) Use exactly one function which must be called from main() for output. Use C++ Style with prototype before main() and the function definition after main(). 7) Output must be formatted exactly as shown on lab write-up with decimal points lined up. Test data (see bankrate.com or use Excel & pmt(to check your answers) Set 1 - $600,000, 4%, 30 Set 2 - $600,000, 2.164%, 15 CIS 22A - LAB #5 MONTHLY HOUSE COSTS Write a CH program to calculate the monthly cost of a house given the selling price, annual rate of interest, and number of years for the loan. The monthly mortgage payment may be computed using the following formula: payment a*i(1+i)" (1 + i)" - 1 where aFamount of loan iFrate of interest per compounding period (annual rate/12) n=number of compounding periods (yrs*12) Assume that the down payment will be 20% of selling price, yearly tax rate is 1.25% of selling price, utilities will be approximately $300.00 per month, and insurance will be $550.00 per year. SPECIFICATIONS & INPUT Use preprocessor statements to set the tax rate, cost of insurance, and the cost of utilities. Set the percentage of down payment as a non-global memory constant. In a separate function called from main() prompt the user for the selling price, the rate of interest, and the number of years for the loan. CALCULATIONS A function called from main() is to hand all computations including invoking a subfunction to compute three values and only three values: down payment, amount of loan, and mortgage payment. OUTPUT One function called from main() is to be used to outout values input and values used in the calculations as well as the monthly payment and total monthly house cost. Output needs to be formatted as follows: MONTHLY COST OF HOUSE SELLING PRICE DOWN PAYMENT AMOUNT OF LOAN INTEREST RATE TAX RATE DURATION OF LOAN (YEARS) $XXXXXXXX XXXXXXXX XXXXXXXX XX.X% XX.X XX MONTHLY PAYMENT MORTGAGE UTILITIES PROPERTY TAXES INSURANCE XXXXXX XXXX.XX XXXX.XX XXXXXX $ XXXXX.XX Theme issue Functions, sub-functions, pass by reference Struture Chart showing necessary functions: main() input calcMonthly Costs output) calcDownLoanMortgage Note: Pre comments must indicate when a parameter is a reference variable. Checkpoints 1) Include name, e-mail, and lab# as comments in the code and also include code to output this information to the output. 2) Minimum of three (3) comments including Pre/Post) in each function. 3) User defined constants for property tax rate, cost of utilities, and cost of insurance. Use non-global memory constant for percent of down payment. 4) Use exactly one function separate from main for input. 5) Call a calculation function from main which handles all calculations. This function needs to call a sub-function (another function) to calculate exactly the following and no more: amount of down payment, amount of the loan, amount of monthly mortgage payment. 6) Use exactly one function separate from main for output. 7) Output must be formatted exactly as shown on lab write-up with decimal points lined up. 8) All functions (other than main() & your signature function) must use prototype style. Test data (see mortgagecalculator.org or use Excel & pmt()to check your answers) Set 1 - $600,000, 4%, 30 Set 2 - $600,000, 2.164%, 15

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!