The customer needs an application that creates a report telling how many months it will take to pay of a loan given a loan payment. The application will accept a client’s loan amount and monthly payment amount.  It will then output the customer’s loan balance each month until the loan is paid off.  The report should not have any negative numbers (the final month should reflect a balance of $0). Display the month and remaining balance for each month until paid off. In addition, the program should display what the original loan amount was.

Np Ms Office 365/Excel 2016 I Ntermed
1st Edition
ISBN:9781337508841
Author:Carey
Publisher:Carey
Chapter6: Managing Multiple Worksheets And Workbooks
Section: Chapter Questions
Problem 4.4CP
icon
Related questions
Question

Lesson 8

Assignment 8 – working with the while and decision structure

 

Objectives:

  • Use the while structure to keep track of:
    • An accumulator
    • A counter
  • Use the decision structure to control/manipulate the final output
  • Output the results

assignment Task Checklist

  • It is expected you have read the required reading in this Lesson before starting the lab.
  • Review Course Resources:
    • Rules of Engagement (ROE).
    • Guidance/Menu Guidance
  • Use Flowgorithm to create the required algorithm to meet customer requirements
  • Ensure you have test cases reflected in the comments
  • File naming Convention: “lastname-l8-asgn.fprg”.
  • Submit all required lab files to blackboard

assignment Task Checklist

  1. Review the customer requirements

Customer Requirements:  The customer needs an application that creates a report telling how many months it will take to pay of a loan given a loan payment.

The application will accept a client’s loan amount and monthly payment amount.  It will then output the customer’s loan balance each month until the loan is paid off.  The report should not have any negative numbers (the final month should reflect a balance of $0).

Display the month and remaining balance for each month until paid off. In addition, the program should display what the original loan amount was.

 

 

 

 

  1. Review the example IPO below.
  2. Open Flowgorithm and save with the required naming conventions in the “Lab Task Checklist” and remember to enter your Program Attributes.
  3. Use Flowgorithm to create the algorithm meeting the customer requirements
  4. Make sure you are using the correct datatype
  5. Use prompts to describe required input before asking for input
  6. Test using the IPO test cases and document the test case in your code as comments.
  7. Display a welcoming message and a purpose statement
  8. Display an End of job message and your name
  9. Processing will require:
    1. A counter for month
    2. An accumulator for balance *hint: initialize with the loan amount
    3. Logic to ensure the last month reflects a 0 balance and not a negative number (see month 11 example in render).
    4. A message with the Original Loan Amount before end of program.

 

 

 

Input, Processing and Output:

 

Input

Processing

Output

Variables:

 

 

Loan Amount

Planned monthly payment

 

 

Get loan amount

Get planned monthly payment

 

Assign counter

Assign original loan amount

Test for balance

Calculate new balance

Keep track of month

Test for 0 balance

 

Welcome message

Prompt: loan amount, and monthly payment

Result: month and balance for each month

Original Loan amount

End of Program message

Test Data

T1: LA = 1001 Pymt = 100… 11 months till 0.

T2: LA =2079.50 Pymt = 231.20…9 months till 0

T3: LA = 4000 Pymt 250…16 months till 0

 

 

 

 

 

Expected Render/Output Example. Do not hardcode or use magic numbers. Your code should allow different loan amounts and payments:

 

 

 

 

Output Results:

 

Welcome to Know Your Loan Company

Enter the loan amount: 1001

Enter the payment amount: 100

 

 

Month 1 Balance is 901

Month 2 Balance is 801

Month 3 Balance is 701

Month 4 Balance is 601

Month 5 Balance is 501

Month 6 Balance is 401

Month 7 Balance is 301

Month 8 Balance is 201

Month 9 Balance is 101

Month 10 Balance is 1

Month 11 Balance is 0

Your Original Loan Amount was : 1001

Thank you for using this program

 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Running Time of Application
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
Information Technology Project Management
Information Technology Project Management
Computer Science
ISBN:
9781337101356
Author:
Kathy Schwalbe
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning