Question: UML Write a suppose that the Loan class is given as shown in the following t program to perform the tollowing taaks. (15pts) :). Create
UML Write a suppose that the Loan class is given as shown in the following t program to perform the tollowing taaks. (15pts) :). Create a Loan object with loan amount $100000, annual interest rate 3.58 and number of years 15 to 30 . (2). Change the annual interest rate to 5.58, and the number of years (3). Displays the monthly payment and total payment L oan annuallnterestRate: double numbero fY ears: int loanA mount: double loanDate: Date The annual interest rate of the loan (default: 2.5) The num ber of years for the loan (default: 1) The loan am ount (default: 1000). The date this loan was created +LoanO + Loan(annuallnterestR ate: double, Constructs a loan with specified interest rate Constructs a default loan object numberO fY ears: int, loanAmount: double) loan amount. doubleReturns the annual interest rate of th is loan +getN um berofY cars): int tgetL oanAmountO: double +getLoan Date): Date +setAnnualinterestR ate( Returns the number of the years of this loan Returns the am ount of this loan. R eturns the date of the creation of this loan. Sets a new annual interest rate to this loan annualinterestR ate: double): void +setN um bero fY ears( Sets a new number of years to this loan num berO fYears: int): void +setLoanAm ount( Sets a new amount to this loan. loan Am ount: double): void +monthly PaymentO: double +totalPaym ent): double Returns the monthly payment of this loan R eturns the total payment of this loan
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
