Mortgage Calculator (MortCalc) class should have one default constructor that initializes the class variables (the amount...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Mortgage Calculator (MortCalc) class should have one default constructor that initializes the class variables (the amount of the loan (principle), the annual interest rate, and the number of years of the loan) to "safe" values. The class should have the principle, interest, years values, as well as the total loan cost, total interest paid, and monthly payment. Write the class with individual Set functions for the three input valued (i.e, the amount of the loan (principle), the annual interest rate, and the number of years of the loan), and individual Gets for the three outputs (total loan cost, total interest paid, and monthly payment). There should be a GetFormattedString that return a string with a complete description of the calculated loan information This class has a private Calculate function that computes all the loan values. There are no cout or cin statements in this class. Following is the equation for computing the monthly payment: M-Pi/[q (1-[1+ (q)])] Where Mmonthly payment P=principle of the loan (amount borrowed) i interest rates where 5% is 0.05 n number of years q=number of payments per year Remember when you write a class, you are not guaranteed that the programmer will call the public functions in any given order. Your programmer could make a MortCalc object and then call GetFormattedString. Be sure that the constructor does its job and initializes the values to something "safe" so you don't run the risk of your program crashing or returning "trash" from the Get functions. Your Set functions will all need to call the Calculate function to insure the data is updated if any one value changes. Write the Bank Loan Officer class (can be named with a shorter name if you'd like, such as LoanOfficer) that is described here, and use the Mortgage Calculator class that was described above. The Loan Officer's job is to determine whether or not the user qualifies for a mortgage loan based on the user's requested amount to borrow, monthly income (net, i.e., after taxes), and monthly expenses. For this program, our LoanOfficer class will have a fixed interest rate of 5.0% and term of loan being 30 years. The LoanOfficer has a MortCalc object as a private class member. This MortCalc object's job is to do the calculations as described in Mortgage Calculator class. The LoanOfficer class will have a default constructor which sets the fixed interest rate and fixed number of years into class members. It also performs other, necessary initializations, including building the introductory, welcome string. This class also has private data for the monthly income, monthly expenses, amount to borrow. There is a bool for the loan approval (true = yes, false = no). This class contains public Ser functions for the net monthly income, expenses, and amount of money that the user is requesting to borrow. The Loan Officer class also has a private Calculate function that uses the MortCalc object to determine the monthly payment and whether or not the loan is approved. The rule for loan approval is this: if the requested loan monthly payment and monthly expenses total (i.e., added together) is greater than 50% of the net monthly income, the loan is NOT approved. There are two Get functions with the LoanOfficer class. The GetIntro) returns a string that has a "welcome" type message that contains the name of the Banking Institution, as well as a statement telling the user what the interest rate and number of years are. The GetLoan Approval() function returns a neatly formatted string with the results of the loan application. This string needed to include the following information: -Loan approval status (yes or no) If the loan is approved, report the details of the loan, including loan amount, interest rate, monthly payment, total loan and total interest. End with a Congratulations message, and state that we're looking forward to doing business with the user. If the loan is not approved, show the income versus monthly payment and expenses does not meet the 50% criteria net income that is necessary for this institution to approve this loan The main function should write your header, and create one LoanOfficer object. Then show the intro from the Loan Officer and begin a do while loop that requests information from the user and reports loan approval status. Continue the process until the user is finished doing loan requests. NOTE: There are no cout < < or cin>> statements in either the MortCalc class OR the LoanOfficer class. All input/output is done in main. Values are set into the class objects or retrieved by the use of get functions. Also, separate interface from implementation. Mortgage Calculator (MortCalc) class should have one default constructor that initializes the class variables (the amount of the loan (principle), the annual interest rate, and the number of years of the loan) to "safe" values. The class should have the principle, interest, years values, as well as the total loan cost, total interest paid, and monthly payment. Write the class with individual Set functions for the three input valued (i.e, the amount of the loan (principle), the annual interest rate, and the number of years of the loan), and individual Gets for the three outputs (total loan cost, total interest paid, and monthly payment). There should be a GetFormattedString that return a string with a complete description of the calculated loan information This class has a private Calculate function that computes all the loan values. There are no cout or cin statements in this class. Following is the equation for computing the monthly payment: M-Pi/[q (1-[1+ (q)])] Where Mmonthly payment P=principle of the loan (amount borrowed) i interest rates where 5% is 0.05 n number of years q=number of payments per year Remember when you write a class, you are not guaranteed that the programmer will call the public functions in any given order. Your programmer could make a MortCalc object and then call GetFormattedString. Be sure that the constructor does its job and initializes the values to something "safe" so you don't run the risk of your program crashing or returning "trash" from the Get functions. Your Set functions will all need to call the Calculate function to insure the data is updated if any one value changes. Write the Bank Loan Officer class (can be named with a shorter name if you'd like, such as LoanOfficer) that is described here, and use the Mortgage Calculator class that was described above. The Loan Officer's job is to determine whether or not the user qualifies for a mortgage loan based on the user's requested amount to borrow, monthly income (net, i.e., after taxes), and monthly expenses. For this program, our LoanOfficer class will have a fixed interest rate of 5.0% and term of loan being 30 years. The LoanOfficer has a MortCalc object as a private class member. This MortCalc object's job is to do the calculations as described in Mortgage Calculator class. The LoanOfficer class will have a default constructor which sets the fixed interest rate and fixed number of years into class members. It also performs other, necessary initializations, including building the introductory, welcome string. This class also has private data for the monthly income, monthly expenses, amount to borrow. There is a bool for the loan approval (true = yes, false = no). This class contains public Ser functions for the net monthly income, expenses, and amount of money that the user is requesting to borrow. The Loan Officer class also has a private Calculate function that uses the MortCalc object to determine the monthly payment and whether or not the loan is approved. The rule for loan approval is this: if the requested loan monthly payment and monthly expenses total (i.e., added together) is greater than 50% of the net monthly income, the loan is NOT approved. There are two Get functions with the LoanOfficer class. The GetIntro) returns a string that has a "welcome" type message that contains the name of the Banking Institution, as well as a statement telling the user what the interest rate and number of years are. The GetLoan Approval() function returns a neatly formatted string with the results of the loan application. This string needed to include the following information: -Loan approval status (yes or no) If the loan is approved, report the details of the loan, including loan amount, interest rate, monthly payment, total loan and total interest. End with a Congratulations message, and state that we're looking forward to doing business with the user. If the loan is not approved, show the income versus monthly payment and expenses does not meet the 50% criteria net income that is necessary for this institution to approve this loan The main function should write your header, and create one LoanOfficer object. Then show the intro from the Loan Officer and begin a do while loop that requests information from the user and reports loan approval status. Continue the process until the user is finished doing loan requests. NOTE: There are no cout < < or cin>> statements in either the MortCalc class OR the LoanOfficer class. All input/output is done in main. Values are set into the class objects or retrieved by the use of get functions. Also, separate interface from implementation.
Expert Answer:
Answer rating: 100% (QA)
include include include using namespace std class mortcal float principle float interest int nYears float totalloan float totalinterestpaid float mont... View the full answer
Related Book For
Statistics for Business and Economics
ISBN: 978-0134506593
13th edition
Authors: James T. McClave, P. George Benson, Terry Sincich
Posted Date:
Students also viewed these programming questions
-
Write a program that reads the amount of monthly mortgage payment and the amount still owed--the outstanding balance--and then displays the amount of the payment that goes to interest and the amount...
-
The average monthly mortgage payment including principal and interest is $982 in the United States. If the standard deviation is approximately $180 and the mortgage payments are approximately...
-
The interest rate on a $100,000 mortgage loan is 7% compounded semiannually. a. What are the monthly payments for a 25-year amortization? b. Suppose that the borrower instead makes weekly payments...
-
The data file arch.gdt contain monthly stock price indices return of U.S. Nasdaq (NR). The data are recorded monthly beginning in 1988:01 and ending in 2015:12. Question 1. i) (Bonus) Consider the...
-
An amount of $1400 was invested for 71 months, maturing to $2177.36. What annually compounded rate was earned?
-
List any errors you can find in the following partial balancesheet: ZABEL COMPANY Balance Sheet December 31, 20Y4 Assets Current assets: s 75,000 106,000 486,150 Cash Notes receivable $115,000 9,000...
-
In the past five years, there have been significant innovations in technology such as smartphones and tablets. Technology companies rely on intellectual property (IP) rights, such as patents,...
-
Bannister Legal Services generated $2,000,000 in sales during 2010, and its year-end total assets were $1,500,000. Also, at year-end 2010, current liabilities were $500,000, consisting of $200,000 of...
-
Lab-created diamonds have become an alternative to traditionally mined diamonds. There are concerns, however, that these artificial diamonds may undermine diamond values and the reputation of natural...
-
Tayler Smith is a singer who has experienced international success in her career. On May 1, 2017, Tayler started her business, Glitter and Gold Studio where she teaches singing. The following...
-
Discuss why cybercrime investigation and prosecution in Kenya will continue to be a hard, multifaceted problem in the foreseeable future. Discuss how Quantum Computing will impact the security of...
-
A dewatering operation began at 7:00 a.m. and ended at 11: 40 a.m. During this time, dewatering was accomplished using a pump with a constant output of 80 gpm. How many gallons of water were removed...
-
Discuss how Shoprite Checkers can use the balanced scorecard as a strategy implementation and control system. Support your discussion with examples.
-
1. Assume we have a training set and a test set as follows: Training set Index y Test set I Index I y 1 5.86 0.74 1 5.80 0.93 2 1.34 1.18 2 0.57 1.87 3 3.65 0.51 3 4.30 -0.06 4 4.69 -0.48 4 6.55 1.60...
-
A vertical straight wire carrying an upward 13.4 A current exerts an attractive force per unit length of 9.40E-4 N/m on a second parallel wire 5.80 cm away. What is the magnitude of the current that...
-
Using the HTTP/SMTP standards as an example discuss why we need standards and, most importantly , why standards are necessary at all layers in the network model.
-
On an assembly line that fills 8-ounce cans, a can will be rejected if its weight is less than 7.90 ounces. In a large sample, the mean and the standard deviation of the weight of a can is measured...
-
Planning: Creating an Audience Profile; Collaboration: Team Projects. Compare the Facebook pages of three companies in the same industry. Analyze the content on all available tabs. What can you...
-
Sales promotions that are used by manufacturers to entice retailers to carry, feature, or push the manufacturer's products are called trade promotions. A survey of 132 manufacturers conducted by...
-
The potential of solar panels on roofs built above national highways as a source of solar energy was investigated in the International Journal of Energy and Environmental Engineering (December,...
-
Pediatric researchers carried out a designed study to test whether a teaspoon of honey before bed calms a child's cough and published their results in Archives of Pediatrics and Adolescent Medicine...
-
What is the amount of cost of goods sold under variable costing? a. $220,000. b. $161,000. c. $154,000. d. $230,000.
-
When comparing Kelleys absorption costing net operating income to its variable costing net operating income, which of the following will be true? a. Its absorption costing net operating income will...
-
Dexter Corporation produces and sells a single product, a wooden hand loom for weaving small items such as scarves. Selected cost and operating data relating to the product for two years are given...
Study smarter with the SolutionInn App