If Public Members Are To Be Restricted From Getting Inherited #1045
If public members are to be restricted from getting inherited from the subclass of the class containing that function, which alternative is best?
This multiple choice question (MCQ) is related to the book/course
gs gs111 OOP Object Oriented Programming Java.
It can also be found in
gs gs111 Member Functions & its Types - Object Oriented Programming MCQ: Public Member Functions - Quiz No.2.
If public members are to be restricted from getting inherited from the subclass of the class containing that function, which alternative is best?
Make the function private
Use private inheritance
Use public inheritance
Use protected inheritance