# Project Worksheets (sample)

### Student Name: Jane Doe Powerwriter

1. What is the goal of the program (that is what is the programming going to do/ What is its task?)

 This program will calculate the Monthly payment and total interest paid for a loan, given the Annual rate, the term in years and the amount of the loan

2. What input does the program need to get? How is that input processed? How is the processed information to be output?

## Output

Annual rate

Term in years

Amount of loan

convert Annual rate to monthly

Convert Years to months

Use PMT function to calculate monthly payment

calculate total interest

Montly payment

Total Interest

3. Identify the variables you will need and what their data types should be

## Data Type

dblRate

dblTerm

dblAmount

curPayment

curInterest

Double (the PMT function requires the arguments be Double data type)

Double

Double

Currency

Currency

4. What controls will you need for the project and what names will you give them?

## Control Name

Labels for "Annual Rate," "Term in Years," "Amount," "Monthly payment," "Total Interest Paid"
TextBox for Entering Rate

Textbox for entering Term

Textbox for entering Amount

Label for displaying monthly payment

Label for displaying Total Interest

Command button for Calculate

Command button for Clear

Command button for Exit

Default Names

txtRate

txtTerm

txtAmount

lblPayment

lblTotInterest

cmdCalc

cmdClear

cmdquit

5. What are the algorithms in pseudocode for the major processes of your program?

## Algorithm

Montly payment

`Get rate, Term and Amount from text boxes`
`doublerate= dblrate / 12 'for months`
`dblrate = dblRate /100 'for percent`
`dblTerm= dblterm * 12 'for monthly`
`curpayment=PMT(dblRate,dblTerm,-dblamount) `
`'the "-" converts the output to a positive number`
`lblpayment.caption = curpayment `

Total Interest

`curInterest = curPayment * dblterm - dblamount`
`'You take the amount of each months payments, `
`'multiply it by the total number of months `
`'and then subtract the original amount of the loan. `
`'The difference is the Interest`
`lblTotInterest.caption = curInterest`