Question

In: Computer Science

In JAVA, Briefly explain how objects are able to achieve both data hiding and implementation hiding.

In JAVA, Briefly explain how objects are able to achieve both data hiding and implementation hiding.

Solutions

Expert Solution

Answer)

In Java, Data hiding as well as encapsulation are considered to be internal fields as well as methods that are visible to that of the outside of the class with respect to API. These are used for keeping the visible fields to a minimum and hence keeping the system tidy and easier for use and understanding. When a field or method is marked visible to the user, one needs to document the same.

Encapsulation is used for keeping the data and functions intact and together and safe from any interference of the outer world. Data hiding is also used for hiding the implementation. This is a process meant for combining the data as well as function to that of the single unit and data would have private and public information in it. The data which is hidden would be marked safe from any manipulation and private members would be accessed by the methods of defining the part of the class.

Please comment in case you need any other inputs.
Please share a like if you find the answer helpful.
Thank you.


Related Solutions

In JAVA, Explain how classes properly handle data hiding and implementation hiding
In JAVA, Explain how classes properly handle data hiding and implementation hiding
How is the Law Implementation of Objects on Intellectual Property? please explain!
How is the Law Implementation of Objects on Intellectual Property? please explain!
Briefly explain. Both informational and behavioural control are essential for successful strategy implementation - 450 -...
Briefly explain. Both informational and behavioural control are essential for successful strategy implementation - 450 - 500 words
How do objects enhance Java? How do objects relate to classes and methods?
How do objects enhance Java? How do objects relate to classes and methods?
How can the true color of objects be affected by artificial lighting? Explain briefly
How can the true color of objects be affected by artificial lighting? Explain briefly
Explain how Java is both a compiled and interpreted language.
Explain how Java is both a compiled and interpreted language.
In Java please. I put down my code and what I was able to achieve so...
In Java please. I put down my code and what I was able to achieve so far: public class Animal {   private String gender; //stores the gender of the animal    private String type; //stores the type of the animal(bear of fish)    private int strength; //stores the strength of the animal    public Animal() {        gender = "none";        type = "none";        strength = 0;    }        public Animal (String g, String...
(a) If you have both sensitive and non-sensitive data, how will you achieve precision in terms...
(a) If you have both sensitive and non-sensitive data, how will you achieve precision in terms of disclosure? (b) In the context of Cloud Computing Security, give an example of a SAS product and briefly explain it. (c) As a client, what solution will you implement if your cloud service provider does not offer TNO. In that particular implementation, how are two levels of encryption used? What is the additional advantage of this kind of implementation?
iv) How can the true color of objects be affected by artificial lighting? Explain briefly. v)...
iv) How can the true color of objects be affected by artificial lighting? Explain briefly. v) “The room is too loud. My ears are ringing everyday” What type of room is this? Suggest solution / solutions for this problem. vi) What does it mean that a room has good sound control ?
What is the level of health that we could reasonably be able to achieve? How could...
What is the level of health that we could reasonably be able to achieve? How could we achieve this? What inputs would be necessary to reach this level and at what cost?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT