Question: D2.2.a -The Model The model class is responsible for holding the data of the app (e tivation) and for performing the payment computation. Hence, wpeame

 D2.2.a -The Model The model class is responsible for holding the

D2.2.a -The Model The model class is responsible for holding the data of the app (e tivation) and for performing the payment computation. Hence, wpeame D2.2b -The Name your Constructor public MortgageModel (String p, Stri Construct an instance of the class having a principle p, anan string a, String Name your a and commus period a, and an annual interest rate i Method public String computePayment () Return the monthly mortgage payment rounded to the nearest cent D2.3-I You can tell from the constructor that the class name is MortgageModel. jou . surenc Note that the model communicates with the outside world through strings becase the fomn language of the UI. Internally, however, it should maintain its data (the amie perform the computation (in the method) using the appropriate types; name, the principle and interest and int for the amortization. It is your D2.3.a As wel The m The computation of the monthly payment is done using this formula: Mo which is a eal where: Pis the principle. . ris the montbly interest pereniage, not percent. For excample, if the Sser entend 4.5 then r would be e.045/12 -0.00375 is the number of months in the amortization. For e campi, ijf lhe sser entered 20 then n would be 20*12-240, * Wi dodify the Ul of your app by adding a button and a label below the monthly payment label 73 neav widgets enable the user to determine how much would still be owing to the bank if the mort minated after fiw years. to the bank if the mortgage were ter The UI is shown in Fig. D22 Normally, a mortgage is carried to the end of its ton per hroughout this period, the balance still owing will reduce to zero after the very last payment. But if the mortgage is terminated before its amortization period then a non- outstanding balance remains and can be computedas shown in the previous exercise. amortiza- $3,229.18 Dis-Model Testing via PSVM $595,606 The modified app captures the outstanding balance after 5 years; Le. x-5 12-60. Figune D2.2 The molifed D2.2.a -The Model The model class is responsible for holding the data of the app (e tivation) and for performing the payment computation. Hence, wpeame D2.2b -The Name your Constructor public MortgageModel (String p, Stri Construct an instance of the class having a principle p, anan string a, String Name your a and commus period a, and an annual interest rate i Method public String computePayment () Return the monthly mortgage payment rounded to the nearest cent D2.3-I You can tell from the constructor that the class name is MortgageModel. jou . surenc Note that the model communicates with the outside world through strings becase the fomn language of the UI. Internally, however, it should maintain its data (the amie perform the computation (in the method) using the appropriate types; name, the principle and interest and int for the amortization. It is your D2.3.a As wel The m The computation of the monthly payment is done using this formula: Mo which is a eal where: Pis the principle. . ris the montbly interest pereniage, not percent. For excample, if the Sser entend 4.5 then r would be e.045/12 -0.00375 is the number of months in the amortization. For e campi, ijf lhe sser entered 20 then n would be 20*12-240, * Wi dodify the Ul of your app by adding a button and a label below the monthly payment label 73 neav widgets enable the user to determine how much would still be owing to the bank if the mort minated after fiw years. to the bank if the mortgage were ter The UI is shown in Fig. D22 Normally, a mortgage is carried to the end of its ton per hroughout this period, the balance still owing will reduce to zero after the very last payment. But if the mortgage is terminated before its amortization period then a non- outstanding balance remains and can be computedas shown in the previous exercise. amortiza- $3,229.18 Dis-Model Testing via PSVM $595,606 The modified app captures the outstanding balance after 5 years; Le. x-5 12-60. Figune D2.2 The molifed

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 Databases Questions!