Lecture overview -- Keyboard shortcut: 'u'  Previous page: Base class access - the C++ rules -- Keyboard shortcut: 'p'  Next page: Discussion: No single most general class in C++ -- Keyboard shortcut: 'n'  Lecture notes - all slides together  Annotated slide -- Keyboard shortcut: 't'  Alphabetic index  Help page about these notes  Course home    Abstraction Mechanisms, Part 2 - slide 23 : 24

Base class access - Examples

We show a few ABC examles that use base class access specifiers

A mariage of convenience between B and C

To see this image you must download and install the SVG plugin from Adobe.In Firefox please consultthis page.
base-class-access-1a.cc
Class D inherits privately from B and publically from C.
base-class-access-2.cc
Same setup: Which variables can access which objects.
base-class-access-2.cc
Same as above - with answers.
Go to exercise
Friends and 'enemies' of a class with private and public bases