SOURCE FILE: paymentsShell.cpp
/*
This program figures the monthly payment on a loan.
It also outputs the total interest paid, the principal paid,
and the total amount paid.
*/
#include <iostream>
#include <cmath>
using namespace std ;
/* PROTOTYPES */
void PrintDirections() ;
/* Exactly what this function must do:
Print directions for the user of the program. */
double GetPrinc() ;
/* Exactly what this function must do:
Prompt the user to enter the amount of the loan
read it in, and return it to the caller. */
double GetRate() ;
/* Exactly what this function must do:
Prompt the user to enter the amount of the annual interest
rate on the loan, read it in, and return it to the caller.
NOTE: The interest is to be expressed as the decimal equivalent.
For example the user should enter 0.04125 when the
annual percentage rate is 4.125%. */
int GetMonths() ;
/* Exactly what this function must do:
Prompt the user to enter the number of monthly
payments, read it in, and return it to the caller. */
double Compute_Payment(double L, double R, int M) ;
/* Exactly what this function must do:
Given that the amount of a loan is L,
the annual percentage interest is R,
and the number of monthly payments to be made is M,
return the required amount of the monthly payment.
NOTE: R is expressed as the decimal equivalent.
For example R = 0.04125 for a 4.125% annual percentage. */
void Report_Payment(double L, double R, int M, double P) ;
/* Exactly what this function must do:
Report to the user -- tell the user that P is the amount
that the payment must be on a loan in the amount of L
at interest rate R, with term M months.
Also tell the user the total amount that will be paid
over the term of the loan, broken down as a sum
of interest plus principal.
The total amount paid is P*M, and the amount of the
interest is P*M-L, the difference between the amount
paid and the amount of the loan.
Note: R is expressed as the decimal equivalent.
For example R = 0.04125 for a 4.125% annual percentage. */
/* **************************************** */
/* MAIN */
/* **************************************** */
int main ()
{
return 0 ;
}
/* **************************************** */
/* PRINT DIRECTIONS */
/* **************************************** */
/* Exactly what this function must do:
Print directions for the user of the program. */
void PrintDirections()
{
cout << "\n" ;
cout << "This program determines the monthly payment on a loan.\n" ;
cout << "\n" ;
cout << "The user inputs the amount of the loan, the interest rate,\n" ;
cout << "and the desired term of the loan.\n" ;
cout << "\n" ;
cout << "The program outputs the amount of the payment, plus the total\n" ;
cout << "amount that will be paid over the term of the loan, broken\n" ;
cout << "down as the sum of the interest and the principal.\n" ;
cout << "\n" ;
}
/* **************************************** */
/* GETPRINCIPAL */
/* **************************************** */
/* Exactly what this function must do:
Prompt the user to enter the amount of the loan
read it in, and return it to the caller. */
double GetPrinc()
{
}
/* **************************************** */
/* GETRATE */
/* **************************************** */
/* Exactly what this function must do:
Prompt the user to enter the amount of the annual interest
rate on the loan, read it in, and return it to the caller.
NOTE: The interest is to be expressed as the decimal equivalent.
For example the user should enter 0.04125 when the
annual percentage rate is 4.125%. */
double GetRate()
{
}
/* **************************************** */
/* GETMONTHS */
/* **************************************** */
/* Exactly what this function must do:
Prompt the user to enter the number of monthly
payments, read it in, and return it to the caller. */
int GetMonths()
{
}
/* **************************************** */
/* COMPUTE_PAYMENT */
/* **************************************** */
/* Exactly what this function must do:
Given that the amount of a loan is L,
the annual percentage interest is R,
and the number of monthly payments to be made is M,
return the required amount of the monthly payment.
NOTE: R is expressed as the decimal equivalent.
For example R = 0.04125 for a 4.125% annual percentage. */
double Compute_Payment(double L, double R, int M)
{
}
/* **************************************** */
/* REPORT_PAYMENT */
/* **************************************** */
/* Exactly what this function must do:
Report to the user -- tell the user that P is the amount
that the payment must be on a loan in the amount of L
at interest rate R, with term M months.
Also tell the user the total amount that will be paid
over the term of the loan, broken down as a sum
of interest plus principal.
The total amount paid is P*M, and the amount of the
interest is P*M-L, the difference between the amount
paid and the amount of the loan.
Note: R is expressed as the decimal equivalent.
For example R = 0.04125 for a 4.125% annual percentage. */
void Report_Payment(double L, double R, int M, double P)
{
}
/* **************************************** */
/* END */
/* **************************************** */