Solved

Select All That Apply

Question 34

Multiple Choice

Select all that apply. Assume you are writing a program that calculates a user's total order cost that includes sales tax of 6.5%.
Which of the following are advantages of using a named constant to represent the sales tax instead of simply entering 0.065 each time the tax is required in the code?


A) It will be easier for another programmer who may need to use this code to understand the purpose of the number wherever it is used in the code.
B) If the tax amount changes to 7.0%, the value will only have to be changed in one place.
C) It allows the end-user to always see the value of the sales tax.
D) It avoids the risk that any change to the value of sales tax will be made incorrectly or that an instance of the tax value might be missed as might occur if the number had to be changed in multiple locations.

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents