Examlex

Solved

A Programmer Notices That the Following Code Snippet Uses the Same

question 88

Multiple Choice

A programmer notices that the following code snippet uses the same algorithm for computing interest earned, but with different variables, in the two places shown below and in several other places in the program. What could be done to improve the program?
Final double RATE1 = 10;
Final double RATE2 = 5.5;
Double interest = investment * RATE1 / 100;
) . .
Balance = balance + balance * RATE2 / 100;


Definitions:

Liberally Administered

A principle or policy applied in a manner that is flexible, generous, or not strictly in accordance with strict rules or formalities.

Aggrieved Party

An individual or entity that has suffered legal wrong or harm, and who is entitled to bring a lawsuit against the party responsible for that harm.

Modified Contract

An agreement where the original terms have been altered or amended by the parties involved, following mutual consent.

Consideration

The value (such as money, a promise, or a service) that is given by both parties in a contract making the agreement legally binding.

Related Questions