Question

Please answer all parts with the corresponding answer choice Question A: What is the motivation behind...

Please answer all parts with the corresponding answer choice

Question A: What is the motivation behind declaring a field private ?
a. field is static
b. prevent field from obtaining invalid values
c. field shouldnt be accessed by client programmers & be able to acess it would appear the class to be more confusing
d . a&b are correct

Homework Answers

Answer #1

Solution

Answer

c. field shouldnt be accessed by client programmers & be able to acess it would appear the class to be more confusing

Explanation

in case if a field is public then anyone on the client side can access and there is a chance to modify it

Private field can be accessed only from inside of the same class so if anything goes wrong we can easily track mistakes

if you keep the field private it should not be accessed by client programmer

---

all the best

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Multiple Choice Please answer all parts of this question. Question 26 with 4 parts: a. Calculate...
Multiple Choice Please answer all parts of this question. Question 26 with 4 parts: a. Calculate the mass (in grams) of 10.7 moles of He.    2.67     6.02 ´1023    6.44 ´1024    14.7 b. The correct name for P3O7 is:    triphosphorus hexaoxide    triphosphorus heptaoxide    phosphorus(II) oxide    phosphorus(V) oxide c. A 86.17-g sample of NaCl is dissolved in 250.0 mL of solution. Calculate the molarity of this solution.    5.898 M    1.475 M   ...
Question 5. Use this table to answer part (a) of question 5. Please answer both parts...
Question 5. Use this table to answer part (a) of question 5. Please answer both parts of this question which appear below the table. Table A Country Currency Currency per Canadian Dollar Canadian Price Index Country Price Index Bolivia Boliviano 8.00 100 700 Japan Yen 125.00 100 25,000 Morocco Dinar 10.00 100 1200 Norway Kroner 6.5 100 650 Thailand Baht 40.00 100 4000 a. Do all of the currency values in this table (Table A) satisfy the predictions of purchasing...
All parts of this question refer to neutral atoms in their ground states. a) What are...
All parts of this question refer to neutral atoms in their ground states. a) What are the principal and orbital quantum numbers (n and l) of all the electrons in aluminum (Z=13) atoms? Please use the standard notation for specifying electron configurations in atoms. b) Estimate (and explain briefly) the ionization energy for the least tightly bound electron in a lithium (Z=3) atom. c) Estimate (and explain briefly) the energy that it would take to remove all the electrons from...
PLEASE ANSWER ALL 3 PARTS AS IT PERTAINS TO THE SAME QUESTION A charge of -0.600...
PLEASE ANSWER ALL 3 PARTS AS IT PERTAINS TO THE SAME QUESTION A charge of -0.600 μC exerts an upward 0.200-N force on an unknown charge 0.350 m directly below it. A) What is the unknown charge (magnitude and sign)? Q=____________ C B) What is the magnitude of the force that the unknown charge exerts on the charge of magnitude -0.600 μC ? F=______________ N C) What is the direction of the force that the unknown charge exerts on the...
PLEASE ANSWER ALL THE PARTS OF THE QUESTION. I HAVE POSTED SOMETHING SIMILAR EARLIER AND THEY...
PLEASE ANSWER ALL THE PARTS OF THE QUESTION. I HAVE POSTED SOMETHING SIMILAR EARLIER AND THEY JUST DO PARTS. PLEASE DO ALL. HELP WILL BE MUCH APPRECIATED! Spectrophotometry Extra Credit Question: a)A 0.00004 M sample of Compound X in a solvent has an absorbance of 0.309 at 528 nm in a 1.000-cm cuvet. The solvent alone has an absorbance of 0.065. What is the molar absorptivity of Compound X? b)A different sample of Compound X in the same solvent has...
*PLEASE ANSWER ALL OR PLEASE SKIP IF YOU ARE NOT ABLE TO ANSWER ALL 4 PARTS....
*PLEASE ANSWER ALL OR PLEASE SKIP IF YOU ARE NOT ABLE TO ANSWER ALL 4 PARTS. THANK YOU* 1.) How do orgasm and ejaculation differ from one another? Select one: a. Orgasms are dependent on changes in the activity of neurons in the brain's cortex, while ejaculation is dependent on changes in the activity of neurons in the spinal cord. b. Orgasms are a purely psychological phenomenon and are not associated with any changes in physiological or neural activity while...
Please show and answer all the parts of this question. Unwanted calls (including illegal and spoofed...
Please show and answer all the parts of this question. Unwanted calls (including illegal and spoofed robocalls) are the FCC's top consumer complaint. The United States is the 8th most spammed country in the world, and the annoying calls are on the rise according to a new report. Suppose that a spammer is testing a scheme to get people to buy something over the phone and getting the “customer” to provide credit card information. He wants to test his scheme...
***PLEASE ANSWER ALL OR PLEASE SKIP IF YOU ARE NOT ABLE TO ANSWER ALL 4 PARTS....
***PLEASE ANSWER ALL OR PLEASE SKIP IF YOU ARE NOT ABLE TO ANSWER ALL 4 PARTS. THANK YOU*** 1.) Which of the following statements about cancers is FALSE? Select one: a. The rates of breast cancer have declined over the past 10 years. b. African-Americans have higher rates of prostate and early breast cancer. c. Most lumps detected in breasts are not cancerous. d. Testicular cancer has a high survival rate if detected early before it spreads. e. All of...
1. Please answer the following question please, all parts, clearly A. An unknown resistor uses 3.2...
1. Please answer the following question please, all parts, clearly A. An unknown resistor uses 3.2 W when connected to a 6-volt battery. When connected to a 12-volt battery, this resistor will use about B. In a closed electric circuit, electrons flow (choose from the 4 options, can be multiple) I) from the + to the – terminal of the battery through any wires connected to the battery II) from the − to the + terminal of the battery through...
Please show and answer all the parts of this question. This is the Confidence Intervals for...
Please show and answer all the parts of this question. This is the Confidence Intervals for Proportions in Statistics Unwanted calls (including illegal and spoofed robocalls) are the FCC's top consumer complaint. The United States is the 8th most spammed country in the world, and the annoying calls are on the rise according to a new report. Suppose that a spammer is testing a scheme to get people to buy something over the phone and getting the “customer” to provide...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT