Question

Hurry up Please help me : C++ Enter property zip code: 95148 Enter property address: 2613...

Hurry up Please help me : C++

Enter property zip code: 95148

Enter property address: 2613 Aborn Rd, San Jose CA

Enter property offer price (principal): $312500

Enter down payment (in percentage %): 20.0

Enter annual interest rate (in percentage %): 5.75

Enter number of years financing: 15

Mortgage calculator is processing your data ... Please wait...

                     **************************************

                      MORTGAGE CALCULATOR RESULTS

                     **************************************

Property address: 2613 Aborn Rd, San Jose CA 95148

Property offer price:                                       $ 312500.00

Down payment:                                              $   62500.00

Loan amount:                                                  $ 250000.00

Loan maturity date:                                         12/31/2034

Mortgage monthly payment:                           $     2076.03

Monthly payment (property tax included):     $     2466.65

Total payment:                                                $ 373684.54

It is sample

Implementation/Coding Requirements

  • Must provide program description/history comment.
  • Declare and initialize descriptive local variables at the beginning of the main function.
  • Variable names must follow Google naming convention.
  • Must use the right data type for different kinds of data. For example must use int for number of years, not double or must use double or float for loan amount, not int.
  • All variables except property annual tax rate must be declared locally inside the main function.
  • Output must be aligned and formatted nicely as shown above.
  • In the main function the program flow must be properly structured as shown below:
    • variable declarations
    • obtain user input such as property zip code, address, property offer price, down payment percentage, annual interest rate and number of years financing using cin statements. You may assume users will enter correct data for your program. No need to perform data validation.
    • pause the program using the provided pause function (see NOTE at the end).
    • perform loan calculations.
    • output the results.

Note: Generally it's considered a bad programming practice and low maintainability to obtain one single data then do some computation then obtain another single data then do some computation. It will be much easier for debugging and maintainability purposes to obtain all data then perform all calculations together as indicated in the main function program's flow above. Failure to do this will result in heavy point deduction.

Mortgage payment calculations

  • You can assume the property's annual tax rate is fixed at 1.5 %. Use a global constant double variable to represent this value.
  • Loan amount = principal x (1 – down payment /100)
  • Monthly interest rate = annual interest rate / 1200
  • Mortgage monthly payment = loan amount x monthly interest rate / ( 1 - 1 / Math.pow (1+ monthly interest rate, number of years * 12) )
  • Property tax monthly payment = principal x property tax rate / 100 / 12
  • Monthly payment (property tax included) = mortgage payment + property tax payment
  • Total payment = mortgage monthly payment x 12  x  number of years
  • Loan maturity date: 12/31/ (2019 + number of years financing)

requirement is really important. I have only 2 hours please help me fast.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

If you have any doubts, please give me comment...

#include<iostream>

#include<cmath>

#include<string>

#include<iomanip>

using namespace std;

const double annual_tax_rate = 1.5;

int main(){

    int zip_code, mature_date, years;

    string address;

    double principal, down_perc, interest_rate, down_payment;

    double loan_amt, monthly_interest_rate, monthly_payment, property_tax_monthly_payment, monthly_payment_with_tax, total_payment;

    cout<<"Enter property zip code: ";

    cin>>zip_code;

    cout<<"Enter property address: ";

    getline(cin, address);

    getline(cin, address);

    cout<<"Enter property offer price (principal): $";

    cin>>principal;

    cout<<"Enter down payment (in percentage %): ";

    cin>>down_perc;

    cout<<"Enter annual interest rate (in percentage %): ";

    cin>>interest_rate;

    cout<<"Enter number of years financing: ";

    cin>>years;

    loan_amt = principal * (1-down_perc/100);

    down_payment = principal - loan_amt;

    monthly_interest_rate = interest_rate/1200;

    monthly_payment = loan_amt * monthly_interest_rate / (1-1/pow(1+monthly_interest_rate, years*12));

    property_tax_monthly_payment = principal * annual_tax_rate/100/12;

    monthly_payment_with_tax = monthly_payment  + property_tax_monthly_payment;

    total_payment = monthly_payment * 12 * years;

    mature_date = 2019+years;

    cout<<setprecision(2)<<fixed;

    cout<<"Mortgage calculator is processing your data ... Please wait..."<<endl;

    cout<<"\t************************************************"<<endl;

    cout<<"\tMORTGAGE CALCULATOR RESULTS"<<endl;

    cout<<"\t************************************************"<<endl;

    cout<<"Property address: "<<address<<" "<<zip_code<<endl;

    cout<<left<<setw(45)<<"Property offer price:"<<"$"<<right<<setw(10)<<principal<<endl;

    cout<<left<<setw(45)<<"Down payment:"<<"$"<<right<<setw(10)<<down_payment<<endl;

    cout<<left<<setw(45)<<"Loan amount:"<<"$"<<right<<setw(10)<<loan_amt<<endl;

    cout<<left<<setw(45)<<"Loan maturity date: "<<" 12/31/"<<mature_date<<endl;

    cout<<left<<setw(45)<<"Mortgage monthly payment:"<<"$"<<right<<setw(10)<<monthly_payment<<endl;

    cout<<left<<setw(45)<<"Monthly payment (property tax included):"<<"$"<<right<<setw(10)<<monthly_payment_with_tax<<endl;

    cout<<left<<setw(45)<<"Total payment:"<<"$"<<right<<setw(10)<<total_payment<<endl;

    return 0;

}

Add a comment
Know the answer?
Add Answer to:
Hurry up Please help me : C++ Enter property zip code: 95148 Enter property address: 2613...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Mortgage Information Annual Interest Rate 4.90% Repayment Years 30 Price of House $275,000 Down Payment $55,000...

    Mortgage Information Annual Interest Rate 4.90% Repayment Years 30 Price of House $275,000 Down Payment $55,000 Principal of Loan Monthly Payments On the Mortgage worksheet, use the PMT function in cell B7 to calculate the monthly payments of the mortgage. Use cell locations from this worksheet to define each argument of the function. Assumethat payments are made at the end of each month.On the Mortgage worksheet, use the data provided to enter a formula in cell B6 to calculate the...

  • The program is in python :) Write a code program to calculate the mortgage payment. The...

    The program is in python :) Write a code program to calculate the mortgage payment. The equation for calculating the mortgage payment is: M = P (1+r)n (1+r)n-1 Where: M is your monthly payment P is your principal r is your monthly interest rate, calculated by dividing your annual interest rate by 12. n is your number of payments (the number of months you will be paying the loan) Example: You have a $100,000 mortgage loan with 6 percent annual...

  • Suppose you obtain a 25-year mortgage loan of $198,000 at an annual interest rate of 8.6%. The annual property tax bill is $965 and the annual fire insurance premium is $489. Find the total monthly pa...

    Suppose you obtain a 25-year mortgage loan of $198,000 at an annual interest rate of 8.6%. The annual property tax bill is $965 and the annual fire insurance premium is $489. Find the total monthly payment for the mortgage, property tax, and fire insurance. (Round your answer to the nearest cent.)

  • Section 4 - Mortgage Calculation Instructions You Have Decided to use a 15 year Amortization for...

    Section 4 - Mortgage Calculation Instructions You Have Decided to use a 15 year Amortization for your Mortgage. Use this information to find the MONTHLY mortgage PAYMENT using the mortgage amount from previous section and a rate of 3.17%. You must also determine the amount of INTEREST, PRINCIPAL and BALANCE owing for the mortgage after 4 Years and 1 Months. Input all the TVM variables and answers into the fields below. Amortization Mortgage Amount From Previous Question $278710.23 15 Years...

  • A property is bought 5 yearsago for $250,000 putting 20% down and financing the rest...

    A property is bought 5 years ago for $250,000 putting 20% down and financing the rest for 30 years with a fixed-rate loan of 5% a year.What is the monthly payment of the loan?Using the "housing" tab, how much equity is in the property today?What percent of the equity today is due to the paying down of the principal?What percent is due to the increase in the value of the property?Where did the rest come from? What percent was it?If...

  • For this assignment please complete the following exercise. Submit your completed source code (*.cpp) and screenshots...

    For this assignment please complete the following exercise. Submit your completed source code (*.cpp) and screenshots demonstrating you successfully ran the program by the due date. ======== Mortgage Class Design a class that will represent a home mortgage. The constructor should accept the loan amount, interest rate, and number of years to pay off the loan. The class should have member functions for returning the monthly payment amount and the total amount paid to the bank at the end of...

  • c++ and please add tables and everything and make sure program is complete. Write a menu...

    c++ and please add tables and everything and make sure program is complete. Write a menu driven program, which would compute compound interest and a monthly payment for a loan. The user will be given a choice to display the info on the screen or to a filo Menu will be the following Enter (1) to calculate your loan monthly payment Enter (2) to calculate your loan monthly payment & write to a file Tips: Compound Interest Formula A =...

  • PLEASE HELP, MATLAB, answers are very appreciated need to study pl 2. Write two m-file functions...

    PLEASE HELP, MATLAB, answers are very appreciated need to study pl 2. Write two m-file functions that will allow you to compare mortgages cakculations for the monthly payment and compare mortgage with different loan values. The monthly payment M, is calculated using 1-2)1 Where Pis the principal loan amount, r is the interest rate (in decimal form not percent form), and y is the number of years of the loan. Create an m-file function called "mortgage_a.m" that will serve as...

  • Please help with question # 6. Thanks please help with questions 1-6. thanks 2 3 A...

    Please help with question # 6. Thanks please help with questions 1-6. thanks 2 3 A B C D E F G H J K L M McCormick & Company is considering building a new factory in Largo, Maryland. James Francis, a landowner, is selling a 4.35-acre parcel of industrial zoned land with a listed sale price of $3,000,000.00 for the land. McCormick & Company is interested in the land and so is another manufacturing company. The competing manufacturing company...

  • 1) A mortgage loan of $1,875,000 has just been made on a property valued at $2,500,000....

    1) A mortgage loan of $1,875,000 has just been made on a property valued at $2,500,000. The interest rate is 5% with 2 points. The loan will require level monthly payments to amortize the principal over 30 years. The mortgage also carries a 1% prepayment penalty. a. What is the indicated loan-to-value ratio? What is the monthly mortgage payment? How much interest is paid in the fifth year? If the mortgage is paid off after 8 years what will the...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT