Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can you do this java question using my previous android question ng DOING 102 1 Chapter 3 A Symphony of APis D3.3.b -Mortgage Data This

Can you do this java question using my previous android question
image text in transcribed
ng DOING 102 1 Chapter 3 A Symphony of APis D3.3.b -Mortgage Data This ready- made class performs the needed analysis. Its API shows this nstructor MPro Constructor public MPrO) Construct an instance having zero principle, AMORT MIN a zero interest. The first observation we make here is that the description refers to" the API (in addition to constructors and methods) and it looks like this "AMORT MIN. These are known as firlds in API lingo and represent public constants. Indeed, we field section in MPro Fields public static final int AMORT MIN The minimum amortization period allowed (value-20). public static final int AMORT MAX The maximum amortization period allowed (value-30). public static final double INTEREST MAX The maximum interest rate percent allowed (value-50). public static final double EPSILON A small number that sets the resolution in this class. Any real number less than it in absolute value is deemed to be zero (value-0.001). As you can see, all these fields are final (hence they are constants) and are all static (so you refer to them in code using the class, rather than the instance, name before the dot). For example, a client of MPro can include this line in its code: double x MPro.INTEREST MAX; This effectively transfers a value across classes (from MPro to the client class). Syntax -wvise you can cesly tell a ield from a method by the absence of parentheses after the name. Note that the API not only describes the contents of fields but also specifies their Nevertheless, client code should refrain from referring to these values. For statement: example, this double x-50 is 100% equivalent to the one above (since INTEREST-MAX is 50) yet it should not be you think of a reason why not? used. Can

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Principles Programming And Performance

Authors: Patrick O'Neil, Elizabeth O'Neil

2nd Edition

1558605800, 978-1558605800

More Books

Students also viewed these Databases questions

Question

I receive useful feedback about my performance.

Answered: 1 week ago

Question

I am encouraged to offer opinions/suggestions.

Answered: 1 week ago