You have been hired by Home Loans Made Easy Bank, which services Mecklenburg and Cabarrus counties. Your first programming task is to create a program to determine whether or not an applicant qualifies to receive a home loan based on his/her ability to repay a mortgage. This bank only writes mortgages for a term of 20 years. Cabarrus County reduces its tax rate by .002 for senior citizens (age 65 or older) and for active military applicants.
Consider the following:
Purchase Price – how much does the desired house cost
Down Payment – how much will the applicant pay up front (amount not to be financed)
If applicant puts down less than 20% of the cost of the home, (s)he must also pay private mortgage insurance each month at the rate of 1% of loan amount.
Principal – amount of loan needed
Interest Rate – 5%
Taxes – annual property tax for house according to county (Mecklenburg – 0.015, Cabarrus – 0.012)
Insurance – cost of homeowner’s insurance is at the rate of $250 per $50,000, or fraction thereof, cost of house. (example: insurance for a $125,000 house is $750).
Annual Income – how much money does the applicant earn in a year (gross figure, not net)
Monthly Existing Debt – how much does the borrow already pay each month for other debt
Debt-to-Income-Ratio – how much of the applicant’s monthly income can be used for debt. This should include current monthly debt payments plus mortgage payment. NOTE: this is a constant amount of 28%
The applicant will qualify for the mortgage if his/her debt-to-income ratio is at or below 28%.
Your program must tell the applicant
Whether or not (s)he qualifies
His/her debt-to-income ratio
I have come to a stump, I just don't know what else to do, I am a beginner to C++ and this is an extra credit assignment that I'd thought I would do since Im new to programming and my overall grade wont be that high.
Any Help on where I can start next would be greatly appreciated.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
|
#include <iostream>
using namespace std;
// Here are some Formula's for calculating compound interest on a mortgage loan
//Note: ^ means power, therefore P(1+r) is raised to the power of n (number of years for loan)
//A=P(1+r)^n
//A - total cost of mortgage plus interest
//P – principal
//r – interest rate
//n – number of years
//My job is to Your first programming task is to create a program to determine
//whether or not an applicant qualifies to receive a home loan based on his/her ability to repay a mortgage.
int main()
{
// Declare Variables
double purchasePrice;
double downPayment;
double principal;
double interestRate;
double insuranceRate; //cost of homeowners insurance is at the rate of $250 per $50,000, 750 = 125000
double annualIncome;
double monthlyDebt;
const double meckTax = .015;
const double cabTax = .012;
const double debtincomeRatio = .28; //28% constant rate
const double seniortaxDiscount = .002; // 65 or older and military
char response;
// Ask for Inputs
cout << "How much does the house cost?" << endl;
cin >> purchasePrice;
cout << "How much will the applicant pay up front?" << endl;
cin >> downPayment;
cout << "Is the down payment less then 20 percent?(Y/N)" << endl;
cin >> response;
if (response == 'Y' )
{
}
else if (response == 'N')
{f
}
cout << "How much of a loan do you need?" << endl;
cin >> principal;
cout << "" << endl;
cin >> ;
// Calculations
= principal(1+interestRate)^
// Ask for Outputs
cout << "Did you qualify for the home loan?" << << endl; //add variable
cout << "You can use this amount of money for debt from your monthly income:" << << endl; //add a variable
return 0;
}
|