Question: Programs like the BMI calculator rely on classes to both manage and process information. Let s consider a similar program that deals with loan payments.

Programs like the BMI calculator rely on classes to both manage and process information. Lets consider a similar program that deals with loan payments. This program will include a Loan class to construct objects that consist of the loan amount, number of years the loan will be taken out for, annual interest rate on the loan, and the date the loan was taken out on. That date can be determined by using the datetime library
today = datetime.date.today()
This class will also include functions to get each of these four properties as well as each monthly payment and the total payment amount. Use the following equation to get a monthly payment (the monthly rate is 1/12 of the annual interest rate):
h=h(1+h)12(1+h)121
Use the following equation to get the total payment:
=h12

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!