Question: If a parent class has a private variable and has no accessors for it, what would be the best solution if a child class needed







If a parent class has a private variable and has no accessors for it, what would be the best solution if a child class needed read only access to it? Best solution Allowing the child class to perform only the required (no additional optional) operations while preventing non-child classes access to it. O Declare the variable as private Declare the variable as protected O Declare the variable as public O Declare a public property for the variable O Declare a protected property for the variable O Declare a private property for the variable Declare a public property for the variable with a private set O Declare a protected property for the variable with a private set O Declare a private property for the variable with a private set Declare a public property for the variable with a protected set Declare a protected property for the variable with a protected set Declare a private property for the variable with a protected set
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
