hwkLoanCalculator

  < Previous  Next >

Due Date

See the calendar for due date.

Description:

Write a Fortran program that calculates information regarding a loan. In particular, calculate the following:
  1. Monthly payment schedule (only display the first and last years)
  2. Total amount paid
  3. Total interest paid
Prompt the user to enter the name of a file that has loan terms in the following format:
Initial_Loan1	Number_of_years1	Annual_interest_rate1
Initial_Loan2	Number_of_years2	Annual_interest_rate2
Initial_Loan3	Number_of_years3	Annual_interest_rate3
...
where entries are separated with white space (e.g., tabs). There will be between 1 and 10 loan terms per file. As an example, see loanTerms.tab. Calculate the payment schedule for each set of loan terms in the file (each line is a different set of loan terms). To simplify your calculations, compound interest monthly and include partial cents.
Your program needs to use at least one function or subroutine.
Additionally, create a git (or SVN) repository (follow standard folder naming conventions) for this project and check in your code at the following milestones:
  1. After writing comments to outline the major portions of the code
  2. After adding in a makefile
  3. After your program successfully reads in the loan terms and displays that information
  4. After your program calculates the monthly payment and displays that information
  5. After your program correctly calculates the first year of payments
  6. After your program correctly displays the total interest and total payments
Make your repository available for me to check out your project.
After the program works correctly, write a brief report (less than a page) in LaTeX that includes the following:
  1. A quick synopsis of your algorithm
  2. How you validated your results
  3. Difficulties encountered
  4. Instructions for how I can checkout your project from your repository (including any a password if required)
  5. The number of hours spent

Example

Here's an example of correct execution (with user input in bold) (see loanCalculator-stdout-refiOptions.txt):
Please enter the name of a loan terms file: refiOptions.tab
You entered refiOptions.tab                                                                                     
Loan #1
Initial Balance: $   170000.00
   Years to Pay:            15
  Interest Rate:         2.875%

Monthly Payment: $     1163.80

Period   Principal   Interest     Balance
     1      756.50     407.29   169243.50
     2      758.32     405.48   168485.18
     3      760.13     403.66   167725.05
     4      761.95     401.84   166963.09
     5      763.78     400.02   166199.31
     6      765.61     398.19   165433.70
     7      767.44     396.35   164666.26
     8      769.28     394.51   163896.97
     9      771.13     392.67   163125.85
    10      772.97     390.82   162352.88
    11      774.83     388.97   161578.05
    12      776.68     387.11   160801.37

   169     1130.85      32.94    12619.62
   170     1133.56      30.23    11486.06
   171     1136.28      27.52    10349.78
   172     1139.00      24.80     9210.78
   173     1141.73      22.07     8069.06
   174     1144.46      19.33     6924.59
   175     1147.21      16.59     5777.39
   176     1149.95      13.84     4627.43
   177     1152.71      11.09     3474.72
   178     1155.47       8.32     2319.25
   179     1158.24       5.56     1161.01
   180     1161.01       2.78        0.00

 Total Interest: $    39483.23
 Total Payments: $   209483.23

Loan #2
Initial Balance: $   170000.00
   Years to Pay:            20
  Interest Rate:         3.000%

Monthly Payment: $      942.82

Period   Principal   Interest     Balance
     1      517.82     425.00   169482.18
...

Rubric:

Points       Item
-----------  --------------------------------------------------------------
_____ /  10  Repository
_____ /  10  Makefile
_____ /  15  Program: Read from file
_____ /  10  Program: Function and/or subroutine
_____ /  25  Program: Monthly payment schedule (first & last years)
_____ /  10  Program: Total amount and total interest
_____ /   5  Program: Output format
_____ /   5  Report: Algorithm synopsis
_____ /   5  Report: Validation
_____ /   5  Report: Difficulties
_____ /   5  Report: Hours

_____ / 105  Total

_____  Approximate number of hours spent
      

Submission

Place the following in a tarball and submit the tarball into the appropriate folder in the dropbox for COMS 6100 at https://elearn.mtsu.edu:
  1. A makefile that will compile your code correctly
  2. Fortran source code
  3. Plain-text output of the program running (e.g., redirect the output of the program using ">")
  4. PDF of your brief LaTeX write-up
  5. Completed rubric (estimates for each line including hours spent)
To make a tarball, do something like the following:
tar -czf hwkLoanCalculator.tar.gz  hwkLoanCalculatorDirectory/

Hints