![xaviuzc](/avatars/46261.jpg)
xaviuzc
22.03.2020 •
Computers and Technology
Explain why each of the following names does or does not seem like a good variable name to represent a state sales tax rate.
a. stateTaxRate
b. txRt
c. t
d. stateSalesTaxRateValue
e. state tax rate
f. taxRate
g. 1TaxRate
h. moneyCharged
Solved
Show answers
More tips
- H Health and Medicine Get Rid of Warts: Simple and Effective Ways...
- S Style and Beauty How to Choose the Perfect Hair Color?...
- C Computers and Internet Best iPad Games: Our Opinion...
- A Animals and plants Man s Best Friend: Which Dog Breed Is the Most Friendly?...
- H Health and Medicine 10 Simple Techniques on How to Boost Your Mood...
- G Goods and services How to Choose the Right High Chair for Your Baby?...
- S Style and Beauty Learn how to tie a keffiyeh on your head like a pro...
- S Style and Beauty How to braid friendship bracelets?...
Answers on questions: Computers and Technology
- C Computers and Technology Which of the following is true of operations within a spreadsheet program’s built-in functions? a. operations within parentheses, then multiplication and division,...
- C Computers and Technology When was the first digital computer invented? who invented it?....
- C Computers and Technology Suppose we number the bits in a 32-bit word from 0 (least significant) to 31 (most significant). Write code for the following C function that will return 1 if x has...
- C Computers and Technology What time is it NOW??...
- M Mathematics Select the next item in the sequence. 10.172,10.983,10.994... A. 10.972 B. 11.000 C.11.172 D.11.983...
- C Chemistry 25. Production is a. Transformation b. Reduction c Consumption d. Valuation...
- A Arts Should video games and Phones be considered a medium in Mass media?...
- P Physics Which type of electromagnetic wave is deliberately used in some circumstances to cause damage to living cells in the human body? A. Infra-red B. Gamma rays C. Microwaves...
- E English Bằng một đoạn văn ngắn,hãy phân tích giá trị nghệ thuật của các biện pháp tu từ trong đoạn thơ sau “Mẹ giã gạo mẹ nuôi bộ đội Nhịp chày nghiêng giấc ngủ em nghiêng...
- E English If you a choice, which country would you visit? * A. have B. had C. have had D. will have...
Ответ:
a. stateTaxRate - A good variable name because it represents what it holds, the state sales tax rate, without being too wordy. Also correctly capitalized in camelcase.
b. txRt - A bad variable name because while short and simple, it is too hard to understand what the variable represents.
c. t - A very bad variable name if you plan on using the variable often. Far too short and you will forget what it represents and is needed for.
d. stateSalesTaxRateValue - A bad variable name because it is just too wordy. Cutting it down to A's variable name is much more reasonable
e. state tax rate - A bad variable name and probably invalid because it has spaces in the name.
f. taxRate - A good variable name if there are no other tax calculations other than state tax rate. Otherwise you would confuse state vs local tax rate or something, making it a bad variable name.
g. 1TaxRate - A bad variable name because the number 1 has no reason being in the variable name. It doesn't add anything to the name.
h. moneyCharged - A bad variable name because it is not specific enough in explaining why the money is being charged and what for.
Ответ:
You can not do it
Explanation: