Computer Science, asked by marky007, 5 months ago

explain the visibility mode through pictorial representation? (5 mark questions)​

Answers

Answered by vaisheltacion
2

Answer:

Visibility mode is used in the inheritance of C++ to show or relate how base classes are viewed with respect to derived class. When one class gets inherited from another, visibility mode is used to inherit all the public and protected members of the base class.

Attachments:
Answered by Itzraisingstar
7

\huge\fcolorbox{black}{lime}{AnsweR:}

An important feature of Inheritance is to know which member of the base class will be acquired by the derived class. This is done by using visibility modes. The accessibility of the base class by the derived class is controlled by visibility modes. The three visibility modes are private, protected, and public.

Private visibility A member declared as private can be accessed only in class. It means that it cannot be accessed outside the class. Public visibility A member declared as public can be accessed inside the class as well as outside the class with objects of that class.

Similar questions