When accessing the subclass instance through go_super, what can you do?

Refer to Exhibit.

When accessing the subclass instance through go_super, what can you do? Note: There are 2 correct answers to this question.
A . Access the inherited private components.
B . Access the inherited public components.
C . Call a subclass specific public method
D . Call inherited public redefined methods.

Answer: AB

Explanation:

When accessing the subclass instance through go_super, you can do both of the following:

Access the inherited private components: A subclass inherits all the private attributes and methods of its superclass, unless they are explicitly overridden by the subclass. Therefore, you can access the inherited private components of the superclass through go_super, as long as they are not hidden by other attributes or methods in the subclass12.

Access the inherited public components: A subclass inherits all the public attributes and methods of

its superclass, unless they are explicitly overridden by the subclass. Therefore, you can access the

inherited public components of the superclass through go_super, as long as they are not hidden by

other attributes or methods in the subclass12.

You cannot do any of the following:

Call a subclass specific public method: A subclass does not have any public methods that are not inherited from its superclass. Therefore, you cannot call a subclass specific public method through go_super12.

Call inherited public redefined methods: A subclass does not have any public methods that are redefined from its superclass. Therefore, you cannot call inherited public redefined methods through go_super12.

Reference: 1: Object Oriented – ABAP Development – Support Wiki 2: Inheritance and Instantiation – ABAP Keyword Documentation

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments