QuestionQ116

VerifiedObject-Oriented Programming

What is the expected behavior of the following code?

Question Image

Explanation

Sub_A.make() returns the integer 1, while Sub_B inherits Super.make(), which implicitly returns None. Adding an integer to None raises a TypeError.

Community Discussion

No comments yet. Be the first to start the discussion!