Machine-translated by Google. Questions are authored in English.
Top

Discussion

The reasons for overriding include extension, restriction, and optimization.

  • A.True
  • B.False

Answer: A

Correct answer: True

A subclass overrides an inherited operation for one of three reasons: to extend it with additional behaviour, to restrict it to a narrower case, or to optimise it using knowledge the subclass has and the superclass does not. In every case the operation’s interface is preserved - only its implementation changes.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.