Objects - ABAP 7.5
![]() |
![]() |
![]() |
Title of test:![]() Objects - ABAP 7.5 Description: Exame ABAP 7.5 |




New Comment |
---|
NO RECORDS |
You have implemented a class CL_CUSTOMER in which you defined a private attribute.From where can you access this attribute directly? There are 2 correct answers to this question. From all methods of all subclasses of CL_CUSTOMER. From all methods of the class CL_CUSTOMER. From all methods of a class to which CL_CUSTOMER grants friendship. From any program using the class CL_CUSTOMER. How would you define a method of an ABAP class to prevent this method from being available in a subclass? Please choose the correct answers. Protected. Private. Abstract. Final. You are writing a program that uses ABAP class. Which components of the class can you create directly from the program? Please choose the correct answers. Only private components. All components. Only protected components. Only public components. Which of the following statements are correct? There are 4 correct answers to this question. None of the above. Class methods assigned to the public visibility section can be accessed outside the class using the static component selector and the class name. You can call private methods within the public methods without reference to the object or class. Only public methods can be addressed outside the class. Static methods can be defined in both the public and private visibility section of the class. You display the content of an internal table using an ALV grid control. The content of the internal table changes during the program. Whick CL_GUI_ALV_GRID class method can you use to display the changed content? Please choose the correct answer. REFRESH_TABLE_DISPLAY in module PBO. SET_TABLE_FOR_FIRST_DISPLAY in module PAI. SET_TABLE_FOR_FIRST_DISPLAY in module PBO. REFRESH_TABLE_DISPLAY in module PAI. What can be part of the signature of an instance contrustor? There are 2 correct answers to this question. Exceptions. Exporting parameters. Importing parameters. Changing parameters. You have 2 objects : O1 of type class C1 and O2 of type class C2. Class C2 is a subclass of class C1. Which of the following statements implements an up cast? Please choose the correct answer. O1 = O2. MOVE O1 TO O2. O2 ?= O1. MOVE O1 ?TO O2. You add the CREATE PROTECTED addition to a class definition. From where you can instatiate the class? There are 3 correct answers to this question. From the class itself. From any protected class. From a child class. From a friend class. From a parent class. You need to perform a downcast.What should you do? There are 2 correct answers to this question. User the operator "=". Catch the exception CX_SY_MOVE_CAST_ERROR. Assign a subclass reference to a superclass reference. User the operator "?=". Which of the following statements are correct? There are 4 correct answers to this question. You can call private methods within the public methods without reference to the object or class. Static methods can be defined in both the public and private visibility section of the class. None of the above. Only public methods can be addressed outside the class. Class methods assigned to the public visibility section can be accessed outside the class using the static component selector and the class name. What ABAP statement can you use to create an instance of the class CL_GUI_CUSTOM_CONTAINER in an ABAP program? Please choose the correct answer. DATA: go_container TYPE REF TO CL_GUI_CUSTOM_CONTAINER. CREATE DATA go_container. DATA: go_container TYPE CL_GUI_CUSTOM_CONTAINER CREATE OBJECT go_container. DATA: go_container TYPE CL_GUI_CUSTOM_CONTAINER CREATE DATA go_container. DATA: go_container TYPE REF TO CL_GUI_CUSTOM_CONTAINER CREATE OBJECT g_container. Your program uses class CL_GUI_ALV_GRID to generate a classic ALV Grid Control. What do you need in your program to react to a user double-clicking a row in the ALV Grid? There are 3 correct answers to this question. A handler class. A method call to raise the double_click event. A SET HANDLER statement to register the handler to the event. A handler method for the doubke_click event. A method call to refresh the display. You have created the following: -A class with an event definition -A handler class with a method ON_EVT that handles this event -A report that instantiates the handler class -A message statement that raises an exception However the report does not react to the event.How do you analyze this issue? There are 3 correct answers to this question. Check if the event is triggered by setting a breakpoint at the MESSAGE...RAISING...statement. Check if the event is triggered by setting a breakpoint at the RAISE EVENT statement. Check if the implementation of the handler method ON_EVT contains the desired logic. Check if the handler method ON_EVT is defined in a subroutine of the report. Check if the handler method is registered to the correct event. Which of the following rules must you follow when you create a static constructor? There are 2 correct answers to this question. You must name the method CONSTRUCTOR. You CANNOT define parameters. You can define class-based or classic exceptions. You must define the method as public. With what can you simulate multiple inheritance? Please choose the correct answer. REDEFINITION. INHERITING FROM. INTERFACES. CLASS CATEGORY. Which statements are true regarding ABAP inheritance? There are 4 correct answers to this question. The instance contructor can be overwritten as part of inheritance. Static constructors do not need to call the suplerclass contructor. Overloading allows a method to have several definitions with different signatures. You can access the superclass component with the prefix SUPER->. Polymorphism requires the developer to specify which method to use with inheritance. The static constructor can be overwritten as part of inheritance. Instance constructors must call the superclass constructor. You created a class by inheriting from a superclass.The superclass contains a public instance method do_something. You want to redefine method do_something. What must you do? Please choose the correct answer. Declare the method FINAL. Leave the signature of the method unchanged. Call the implementation in the superclass. Change the visibility of the method to PROTECTED. Which class is used to define a reference for an instance of the ALV object model? Please choose the correct answer. Class CL_GUI_CUSTOM_CONTAINER. Class CL_SALV_TABLE. Class CL_GUI_ALV_GRID. Class CL_GUI_BDC_GRID. Which of the following statements create a data object? There are 3 correct answers to this question. TYPES. CLASS. PARAMETERS. CONSTANTS. CLASS-DATA. You use Unified Modelling language (UML) to design your classes. You want to describe the message exchange between objects. Which diagram can you use? Please choose the correct answer. Class diagram. Object diagram. Component diagram. Sequence diagram. What does the Refactoring Assistant allow you to do? There are 2 correct answers to this question. Move components between superclasses and subclasses. Move between classes and interfaces. Rename all subclasses of a method. Rename all occurences of a method. What can you use to achieve polymorphism? Please choose the correct answer. Inheritance. Reports. Events. Subroutines. |