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...
Please answer all parts of Question 1. Please show all work and all steps. 1a.) Find...
Please answer all parts of Question 1. Please show all work and all steps. 1a.) Find the equilibrium of x' = x + 1 y' = x + 3y - 1 1b.) Find a, b such that the equilbrium of x' = x + 3y + a y' = x - y + b is (1,2) 1c.) Find alpha, beta such that x' = (alpha)(x) + y y' = -2x + (beta)(y) is hamiltonian.
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 parts of the question, with all work shown This problem concerns the normal...
Please answer all parts of the question, with all work shown This problem concerns the normal approximation to the binomial. The "continuity correction" (sometimes called Yates's Continuity Correction) is a technique (a) Suppose of all the kids that show up on Halloween night, 58% are dressed in Deadpool costumes. If 60 kids show up, what is the probability that between 33 and 38 (inclusive) kids will be dressed in Deadpool costumes? (Use the binomial.) (b) Repeat the previous question, but...
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...