Determine the actual payment schedule for a real mortgage

Assignment Help Computer Engineering
Reference no: EM132107920

Programming in C Interest Simulation

Generally, when someone takes out a mortgage or other non-revolving loan, each payment is the same except for the final payment, which might be a little more or a little less in order to exactly pay off the loan. How is the required payment amount calculated?

There is a closed form solution for this problem, which is easily derivable or can be looked up, but it produces a result that is not quite correct because it is based on the assumption that all transactions have infinite resolution, meaning, for instance, that the monthly payment might be $1234.5678473.... In actuality, all transactions are rounded to the nearest cent. The result is that the actual monthly payment will be slightly different than the ideal payment - though seldom by more than a few cents - and that the final payment must be slightly different,
usually by just a few dollars, to clear up the residual error.

Your program here will compute a mock Financial Disclosure statement for the principal and interest portion of a fixed-rate mortgage. The user will be asked to enter the initial mortage balance, the APR, and the number of years in the loan term. To simplify things, it will be assumed that the mortgage is taken out on the first day of the month and that payments are due the first day of the each month thereafter.

This is not at all an unreasonable assumption because loan companies generally force this situation to be the case, in effect, by requiring interest associated with a closing date that is not on the first of the month either be prepaid at closing or folded into the loan balance as of the first day of the next month. The other assumption we will make is that a "month" is exactly 1/12 of a year. This is common practice in the financial industry and is written into almost all mortgage contracts.

In order to determine the actual payment schedule for a real mortgage, the loan payments are simulated and the payment amount adjusted until the payment that comes closest to paying off the loan on schedule is found. The final payment is then adjusted to exactly clear the loan.

You are to run such a simulation to find the correct monthly payment. Each month interest is first computed on the prior month's balance and then this amount is added to the balance and the current month's payment is applied. Keep in mind that each transaction must be properly rounded to the nearest cent. The simulation should run in a loop that progressively adjusts the monthly payment until the magnitude of the residual balance after the final payment is as small as possible; this might result in either a slight overpayment or a slight underpayment.

Typical run of the program:

What is the beginning principal balance ($): $ 250000.00

What is the annual interest rate (%): 4.125

What is the loan term (years): 15

IF PAID OFF ON SCHEDULE

179 equal payments of:.... $ 1864.92

Final payment of:......... $ 1864.59
Total Finance Cost:....... $ 85985.27
Run your simulations for the following cases and place the results in a ReadMe.txt file.
$200,000; 4.500%; 30 year
$200,000; 4.375%; 20 year
$200,000; 3.875%; 15 year
$200,000; 3.875%; 10 year

NOTE: These rates are current rates for no-closing cost loans with superior credit.

PR02

Write a program that asks the user for an integer value (may be negative) and that outputs the bit pattern for that integer, starting with the most significant bit. You should use an int data type which, on nearly all modern compilers, is a 32-bit value. Your output should print the decimal value, the 8-digit hexadecimal representation, and the 32-bit binary bit pattern with the bits in groups of four separated by a space.

You are required to write (and use) the function-like macro testbit(integer, position)that evaluates to true (1) or false (0) depending on if the bit in the indicated position (with 0 being the least significant bit) is a 1 or 0, respectively.

Run your program for a selection of small, moderate, and large integer values, both positive and negative, placing the results in a ReadMe.txt file.

NOTE FOR BOTH PROGRAMS

We have not covered programmer-defined functions yet and so it is expected that all of your code will be in a single main() function. If you want to write functions, that is fine. However, you are NOT to use any library functions that perform the significant tasks, such as rounding a value to the nearest cent. Part of the intent is for you to solve those types of problems yourself.

Reference no: EM132107920

Questions Cloud

Write a program that will read in 12 integer values : Write a program that will read in 12 integer values into a 3 times 4 two-dimensional array (i.e., an array of 3 arrays of 4 integers).
Modify the application sio it can save the monthgly rainfall : Modify the application sio it can save the monthgly rainfall amounts entered by the user to a file and read the monthly amounts from a file(visual basics).
Difference between line item budget : What if any, is the difference between line item budget, program budget, and performance budget? Are they all used or does the company choose
Create a program in that mimics an atm machine. : Create a program in C++ that mimics an ATM machine. Request input from the user.
Determine the actual payment schedule for a real mortgage : PR01: Write a program that asks the user for an integer value (may be negative) and that outputs the bit pattern for that integer.
What is the payback period : This booth will cost $9,000. Sales are expected to be $3,600 per year for the next 3 years. After the three years, the value is expected to be zero.
What does the bond currently sell for : It has a YTM of 6% and the coupons are paid semiannually at a 11% annual rate. What does the bond currently sell for? (Show workings)
What is the bond full price : Assuming a 30/360 day-count convention, what is the bond's full (dirty) price? Round your answer to the nearest cent (2 decimal places).
What is the growth outlook : What is the Growth outlook and the Level of barriers to entry the Petroleum Industry?

Reviews

Write a Review

Computer Engineering Questions & Answers

  In what ways can an html form element acquire focus

In what ways can an HTML form element acquire focus? Describe the approach to addressing HTML elements using forms and elements.

  What are the xml databases

What is data warehousing? How are databases and data warehousing related? Do you believe data warehousing is a fad or a "real" technology that would benefit organizations?

  Write a program that produces a multiplication table

Write a program that produces a multiplication table with 25 rows of computations. Allow the user to input the first and last base values for the multiplication

  Create a gui application that allows the user to enter data

The remainder goes to the movie company. Create a GUI application that allows the user to enter the following data .

  How to redesign the coding design

How to redesign the coding design? Write down a sentence for each change you have optional, indicating what data entry problem (from part a) change will eliminate.

  Write a paragraph describing what mistakes the company made

Write another paragraph describing what mistakes the company / individual / organization made that made their system less secure.

  Calculate the costs associated with a loan

To calculate the costs associated with a loan, such as the one that Bob and Carol need to start their winery, you must have the following information The annual interest rate.

  Program for converting infix expressions into postfix form

Write a program which will transform the infix expressions into the postfix form and then determine the resulting postfix expression.

  Write a function mode that takes a single argument numlist

Write a function mode(numlist) that takes a single argument numlist (a non-empty list of numbers), and returns the sorted list of numbers which appear

  What is the history of osi model and benefits

Why you will recommend either asymmetric key encryption, symmetric key encryption, or no encryption at all for the Email correspondence.

  Identify two it related projects that would be consistent

Identify two IT - related projects that would be consistent with this plan. Recommend one of the two projects for implementation.

  Describe the various methods by which bartlett might

power networks has been hired as a consultant to bartlett inc. bartlett has a single site located in toledo ohio with

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd