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.
You might also like to view...
The ___________________ function is used to input a Boolean value from the user.
Fill in the blank(s) with the appropriate word(s).
To draw on a slide or highlight information on a slide, you can use ________
Fill in the blank(s) with correct word
How do you enable BitLocker drive encryption in Windows Vista Ultimate or Enterprise?
What will be an ideal response?
Which statement regarding for statements is false?
a) In a for statement, the initialization, loop-continuation condition, and increment can contain arithmetic expressions. b) The increment must be greater than zero. c) If the loop-continuation condition is initially false, the body of the loop is not performed. d) It is common to use the control variable for controlling iteration while never mentioning it in the body of the loop.