[Cs3] CS3 final exam notes confusion

Mikhail Nesterenko mnestere at kent.edu
Thu Dec 5 21:47:13 EST 2024


What this means is that in case of private inheritance, the pubilc
methods of the base class become private and thus unavailable to
clients. However, the derived class may make them selectively public.
The example we studied is here:

http://antares.cs.kent.edu/~mikhail/classes/cs3/Examples/Adapter/figuresPrivateInheritance.cpp

Thanks,
--
Mikhail

> I'm emailing to clarify something on the final exam notes. Under the
> "Notions" section there is a part that says "making a private method
> of base class public" as far as I know this is not possible since
> private member functions are never inherited into a derived class. I
> just wanted to clarify that what this means is that when a derived
> class inherits the base class as private it can make a public member
> function of the base class public in the derived class with the
> "using" keyword. I'm sorry if I didn't word that very clearly.


More information about the cs3 mailing list