Software Development Fundamentals — Question 26

You have a class named Glass that inherits from a base class named Window. The Window class includes a protected method named break().
How should you call the Glass class implementation of the break() method?

Answer options

Correct answer: B

Explanation

The correct answer is B because the break() method is protected in the Window class, and it must be called through the base class reference. Options A, C, and D are incorrect because they either attempt to call the method directly from the derived class or use incorrect terminology that does not align with object-oriented principles.