Transform the following UML diagram to a Loan class: Loan -annualInterestRate: double -numberOfYears: int -loanAmount: d

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

Transform the following UML diagram to a Loan class: Loan -annualInterestRate: double -numberOfYears: int -loanAmount: d

Post by answerhappygod »

Transform The Following Uml Diagram To A Loan Class Loan Annualinterestrate Double Numberofyears Int Loanamount D 1
Transform The Following Uml Diagram To A Loan Class Loan Annualinterestrate Double Numberofyears Int Loanamount D 1 (190.96 KiB) Viewed 26 times
Transform the following UML diagram to a Loan class: Loan -annualInterestRate: double -numberOfYears: int -loanAmount: double The annual interest rate of the loan (default: 2.5). The number of years for the loan (default: 1) The loan amount (default: 1000). Constructs a default Loan object. Constructs a loan with specified interest rate, years, and loan amount. +Loan) +Loan(annualInterestRate: double, numberOfYears: int, loanAmount: double) +getAnnualInterestRate(): double +getNumberOfYears(): int +getLoanAmount(): double +setAnnualInterestRateſ annualInterestRate: double): void +setNumberOfYears numberOfYears: int): void +set LoanAmount loanAmount: double): void +getMonthlyPayment(): double +getTotalPayment(): double Returns the annual interest rate of this loan. Returns the number of the years of this loan. Returns the amount of this loan. Sets a new annual interest rate to this loan. Sets a new number of years to this loan. Sets a new amount to this loan. Returns the monthly payment of this loan. Returns the total payment of this loan. Your class should include a test driver function main(). This main() should do the following: 1. Read annual interest rate, number of years and the loan amount. 2. Create a Loan object 3. Display the monthly payment and the total payment. Make sure your program is working correctly.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply