Lecture overview -- Keyboard shortcut: 'u'  Previous page: Friends - Example 1 -- Keyboard shortcut: 'p'  Next page: Friends - class Point - notational convenience -- Keyboard shortcut: 'n'  Lecture notes - all slides and notes together  slide -- Keyboard shortcut: 't'  Help page about these notes  Alphabetic index  Course home  Lecture 3 - Page 30 : 36
Notes about C++
Abstraction Mechanisms, Part 1
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

y:/Kurt/Files/Advanced-programming-cpp/cpp/kn/friends/situation-2/friends-sit2.ccClass A provides friendship to class B.


y:/Kurt/Files/Advanced-programming-cpp/cpp/kn/friends/situation-4/friends-sit4.ccClass A and B are mutual friends of each other - problems in this version.


y:/Kurt/Files/Advanced-programming-cpp/cpp/kn/friends/situation-3/friends-sit3.ccClass A and B are mutual friends of each other - this version is OK.


y:/Kurt/Files/Advanced-programming-cpp/cpp/kn/friends/situation-5/friends-sit5.ccA variant were we want ma to be a friend of B and mb to be friend of A - problems in this version.