Lecture 4 - Slide 34 : 40
Friends - Example 2

Given two classes A and B with private state a and b respectively

We illustrate various possibilities and challenges of providing friendship from one class to the other

friends-sit2.cc
Class A provides friendship to class B.
friends-sit4.cc
Class A and B are mutual friends of each other - problems in this version.
friends-sit3.cc
Class A and B are mutual friends of each other - this version is OK.
friends-sit5.cc
A variant were we want ma to be a friend of B and mb to be friend of A - problems in this version.