answersLogoWhite

0


Best Answer

Other than that the friend has privileged access to the private members of the class in which it is declared a friend, there are no implications. However, there has to a be a reason for the friend to require that access.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What are the friend function implications on information hiding?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What are the limitations of friend function in c plus plus?

Only that they cannot be inherited by derived classes. This is "a good thing". Other than that, a friend function has full access to a class' private and protected members and you cannot limit its scope. At this data hiding feature of c++ is broken.


What is information hiding in software engineering?

The Modules should be designed specifically so that no information(Algorithm and data) contained within the module is not accessible to the other module that have no need of that information. Hiding implies that Effective modularity can be achieved by defining a set of independent modules that communicate with one another only through information necessary to achieve software function.


What is stegnography?

Stegnography is defined as the art of hiding information, data or messages in an image. Even the different file formats can be used for the purpose of hiding the information like for example the video or audio etc. The purpose is to pass on the information with out any regard or knowledge of others safely to the destination. The advantage of stegnography is that those who are outside the party even do not realize that some sort of communication is being done.


What is the difference between data hidding and data abstraction?

Abstraction: Abstraction refers to removal/reduction of irrelevant data or unnecessary data or confidential data from a Class. Data hiding: Data hiding is a feature provided by the abstraction for hiding the data from the class.


How does friend operator function differ from member operator function?

In C++, we know that private members cannot be accessed from the outside class.That is a non-member function cannot have an access to the private data of a class.However there could be a situation where we would like two classes to share a particular function.For example consider a case where two classes, manager and scientist have been defined.We would like to use a function income_ tax () to operate on the objects of both these classes.In such situation, C++ allows the common function to be made friendly with both the classes. Such a function needs not be member of any these classes.To make outside function friendly to a class, we have to simply declare this function as a friend of a class as shown below:Class ABC{………..Public:……..……..Friend void xyz (void); //declaration};When the function is logically coupled with the class (like your maze connectedness example)When the function needs to access private or protected members, it's better to make it a member than a friend. when it's a generic function that can be templatized to naturally work on other classes (look at the header for good example) .

Related questions

What are the limitations of friend function in c plus plus?

Only that they cannot be inherited by derived classes. This is "a good thing". Other than that, a friend function has full access to a class' private and protected members and you cannot limit its scope. At this data hiding feature of c++ is broken.


What is information hiding in software engineering?

The Modules should be designed specifically so that no information(Algorithm and data) contained within the module is not accessible to the other module that have no need of that information. Hiding implies that Effective modularity can be achieved by defining a set of independent modules that communicate with one another only through information necessary to achieve software function.


Why Is My Friend Hiding Secrets from Me?

When you friend is keeping secrets from you it is best to confront them to get clarity


Is your best friend hiding his feelings from you?

It's difficult to say for certain without more information, but if you suspect your best friend may be hiding their feelings, it could be helpful to have an honest and open conversation with them. Express your concerns and create a safe space for them to share if they feel comfortable doing so. Ultimately, understanding and communication are key in any relationship.


What is the part of speech for hiding?

The word "hiding" is a present participle verb form that can also function as a gerund or a noun.


What are the release dates for My Friend Flicka - 1955 Rebels in Hiding 1-27?

My Friend Flicka - 1955 Rebels in Hiding 1-27 was released on: USA: 30 March 1956


Where can one find more information about hiding blogs?

There are many places where one can find more information about hiding blogs. One can find more information about hiding blogs at popular on the web sources such as Square Space and Blogs By Heather.


What is the USA hiding?

The United States is hiding information that it considers would jeopardize its national security.


Is Miley Cyrus prengnant?

she is not she is my friend and she is just hiding that she is really just fat


Where Is Michelle Parker?

michelle parker is hiding. my dad told me. he is a friend of hers.


If a guy don't email you as a friend and that mean he hiding something?

Most of the time yes.


Where is your friend Angle?

in a different room My friend Angle is hiding inside various triangles. He's running a bit of a fever, about 90 degrees