Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I feel confused about this question! who can help me? and please explain why...

ID: 3673833 • Letter: I

Question

I feel confused about this question! who can help me? and please explain why...

Which of the following is true about inheritance? Select all that apply.

Select one or more:

a. A class can directly inherit from (extend) the Object class.

b. A parent class's instance variables should be declared private to enforce good principles of object-oriented programming (such as encapsulation).

c. A child class's instance variables should be declared private to enforce good principles of object-oriented programming (such as encapsulation).

d. All methods and constructors of a parent class are inherited by the child class.

e. You should override all methods from the parent class to enforce good principles of object-oriented programming (such as encapsulation).

f. You should use the @Override annotation whenever you override a method.

e. All instance variables in a parent class can be directly accessed in a child class.

Explanation / Answer

True: a,c,d, f