1.

Should The Member Functions Which Are Made Public In The Base Class Be Hidden?

Answer»

As the PUBLIC member FUNCTIONS of the base CLASS are necessary to implement the public interface of the class, the member functions which are made public in the base class should never be hidden. When you are designing a class, make the derived data members PRIVATE because a private member of the derived class is accessed through the protected or public member functions of the base class.

As the public member functions of the base class are necessary to implement the public interface of the class, the member functions which are made public in the base class should never be hidden. When you are designing a class, make the derived data members private because a private member of the derived class is accessed through the protected or public member functions of the base class.



Discussion

No Comment Found