Ask your own question, for FREE!
Computer Science 8 Online
OpenStudy (anonymous):

what does it mean to derive a class from a base class privately or publicly?

OpenStudy (anonymous):

Well, classes (as well as structures) have access levels. There are three: private, protected and public. They define how you can interact with class' members (reading/writing variables, invoking methods). Public access is the most permissive one and allows you just access members everywhere you want to. Protected and private are not permissive and they block access in some places. When you derive new class, you can decide whether change access levels of members acquired from the base class; if you derive publicly, you don't change anything, if you derive privately, you change all access levels to private.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!