answersLogoWhite

0


Best Answer

The ability to make changes in your code without breaking the code of all others who use your code is a key benefit of encapsulation. You should always hide implementation details. To elaborate, you must always have your variables as private and then have a set of public methods that others can use to access your variables. Since the methods are public anyone can access them, but since they are in your class you can ensure that the code works the way that is best for you. So in a situation that you want to alter your code, all you have to do is modify your methods. No one gets hurt because i am just using your method names in my code and the code inside your method doesnt bother me much.

If you want maintainability, flexibility, and extensibility (and I guess, you do), your design must include encapsulation. How do you do that?

• Keep instance variables protected (with an access modifier, mostly private).

• Make public accessor methods, and force calling code to use those methods rather than directly accessing the instance variable.

• For the methods, use the JavaBeans naming convention of set and get.

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Explain why naming encapsulation are important for developing large?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What do naming firms charge for developing USAN-INN names?

$35,000 is standard


How do you explain the naming conventions used to identify internet host company?

Naming conventions are used to identify ip addresses and things of that nature. They use various system names and methods for each different naming convention.


What does naming the animals signify?

The naming of the animals is very important as it gives them an identity. This can then be used in a number of research procedures.


Who did Athena quarrel with over the naming of Greece's most important town?

If by Greece's most important town you meant Athens. It was Poseidon that Athena quarreled with over it's naming.


How did carolus linnaeus findings help us today?

By developing a universal naming classification, Carolus Linnaeus's research allows for a systematic classification for plants. This naming system had removed some erroneous information and streamlined classification for the masses.


Why is the naming of a Jewish child important?

To welcome the child into the Jewish community.


What two functions of encapsulation?

If you want maintainability, flexibility, and extensibility (and I guess, you do), your design must include encapsulation. How do you do that? • Keep instance variables protected (with an access modifier, mostly private). • Make public accessor methods, and force calling code to use those methods rather than directly accessing the instance variable. • For the methods, use the JavaBeans naming convention of set and get.


What layer does the encapsulation method takes place?

If you want maintainability, flexibility, and extensibility (and I guess, you do), your design must include encapsulation. How do you do that? • Keep instance variables protected (with an access modifier, mostly private). • Make public accessor methods, and force calling code to use those methods rather than directly accessing the instance variable. • For the methods, use the JavaBeans naming convention of set and get.


Give and explain the 3 ways of naming a set?

=See the section in this article about that topic. http://en.wikipedia.org/wiki/Set_(mathematics)


What is the most important myth of Athena?

Arachne, the naming of Athens, or Medusa. Probably Medusa.


The currently-used binomial nomenclature was developed by Linnaeus true or false?

escription of Linnaeus' role in developing the modern system of naming organisms.


Who is credited with developing our modern method of animal classification?

Swedish botanist Carl Linnaeus is credited with developing our modern method of animal classification, known as binomial nomenclature, in the 18th century. He established a system for naming and organizing living organisms based on their physical characteristics and relationships.