Explain the notion of friendship. Explain the negative aspects of friendship as described in the text.

What will be an ideal response?

Functions that are declared as friends of a class have access to that class’s private and protected members. Some people in the object-oriented programming community prefer not to use friend functions. Such people believe friendship corrupts information hiding and weakens the value of the object-oriented design approach, because friend functions can directly access a class’s implementation details that are
supposed to be hidden.

Computer Science & Information Technology

You might also like to view...

All of the following are example of mathematical summaries EXCEPT:

A) Sum. B) Avg. C) Count. D) Sort.

Computer Science & Information Technology

The step in preparing a hard drive that assigns drive letters to the hard drive is known as _______

Fill in the blank(s) with correct word

Computer Science & Information Technology