Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Can you do this java question using my previous questions DOING 104 Chapter 3 A Symphony of APhs The API lists three methods that modify
Can you do this java question using my previous questions
DOING 104 Chapter 3 A Symphony of APhs The API lists three methods that modify the state: ublic void setPrinciple (String p) The principle mutator Throws an Exception if p is not numeric or not positive. MPro Methods public void setAmortization(String a) The amortization mutator. Throws an Exception if a is not numeric or not in [AMORT_MIN AMORT MAX] public void setInterest (String i) The interest mutator. Throws an Exception if i is not numeric or not in C0, INTEREST_MAXI e state, and as a matter of con A mutator is a method that mutates (ic. modifies) th is named setx if it mutates the attribute x. Given these me we want by creating a default state and then mutating it. Something like this: ethods, we can now have any state MPro mp - new MProO: mp. setPrinciple( 400000*); mp. setAmortization("20); mp.setInterest("5"); e; the three parameters in the real activity class will come from the view to reflect the user entries. For example, the "400000 string literal would be replaced with the following value: CEditText) findvieelyId(R.d.pBox)).getTexto.toStringo The API lists two methods that perform computations: MPro Methods public String computePayment (String fmt) Compute the monthly payment of this instance and return it formatted as specified in the fmt string. public String outstandingafter (int years, String fmt) Compute the balance that is still outstanding after the given number of years and return it formatted as specified in the fmt string Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started