Anda di halaman 1dari 8

1.

Blueprint of an object :

2. Which statement will create an instance of a class A. Data: my_object TYPE REF TO my_class B. Create Object my_object.. C. Class my_class Definition. D. Class my_class Implementation.

3. What syntax provides access to individual components of a class within the class A. CALL METHOD object instance->ME-> B. CALL METHOD ME-> C. object instance->ME-> D. ME->

4. In the following method, what other parameters are allowed CLASS lcl_course DEFINITION. PUBLIC SECTION. METHODS: get_course_name IMPORTING im_name type string Returning value(student_count) type I. ENDCLASS.
A. B. C. D.

Exporting Exceptions. Changing Receiving

5. Identify the line that contains the valid use of the READONLY additon 1. class lcl_course definition. 10 public section. 20 Data: Price(3) type p decimals 2 value 100 READ-ONLY.. 30 Types: type_category(15) type C READ-ONLY. 40 Constants: write_position type I value 10 READ-ONLY. 50 private section. 60 data: category(15) type C READ-ONLY, 70 class-data: course_count type I READ-ONLY. endclass.

6. Constructors have special considerations. Identify the incorrect statement below. A. Gernerally, constructor methods can not be called B. The signature can consist only of import and exception parameters C. The run time constructor executes when there is no constructor explicitly defined in the class D. The Constructor must defined in the Public section E. A class can have multiple constructors.

7. Using example code below, choose the correct syntax for the redefined method 1. Class lcl_car definition. Public Section. method calc_speed importing im_distance type ty_dist. End Class.

A. B.

C. D.

Method calc_speed importing im_distance Redefinition Method calc_speed Redefinition importing im_distance type ty_dist. Method calc_speed Redefinition.. Method calc_speed importing im_distance.

8. Suppose you are copying a subclass reference to a reference variable that is typed to the superclass (up-cast). What components can you access with this reference variable? Choose the correct answer(s). A. Redefined components of the superclass B. Newly defined components of the subclass C. Inherited components of the superclass D. Redefined components of the subclass 9. Assume that a reference variable typed on a superclass contains a subclass reference and you copy this to a reference variable that is typed on the class (down-cast). Which of the following components can you access with this reference variable? Choose the correct answer(s). A. Redefined components of the superclass B. Newly defined components of the subclass C. Inherited components of the superclass D. Redefined components of the subclass 10. Changing the view of an instance of a class with more details is referred to as A. dynamic referencing B. UP CAST C. Narrowing CAST D. Widening CASt.

11.

Does an interface have an implementation part?

12. Method "Display" of Interface "lif_material" is implemented in class "lcl_basepart". Mark the syntax to access the method. A. lif_material~display.. B. lcl_basepart~display C. lcl_basepart->display D. display E. lcl_basepart=>display F. lcl_basepart~display 13. Mark the operators used to widen cast of a class A. = B. =? C. =TO D. -> E. => F. ?=

13 . Suppose that you copy an instance reference of a class that implements an interface to a reference variable that is typed on the interface (up-cast). What components can you access with this reference variable? Choose the correct answer(s). A. The components of the interface B. The components of the class that are not defined in the interface C. All components of the class D. The components of the interface for which alias names have been defined

14.

Suppose that a reference variable that is typed on an interface contains an instance reference of a class that implements this interface and you copy this to a reference variable that is typed on the class (down cast). Which of the following components can you access with this reference variable? Choose the correct answer(s). A. The components of the interface B. The components from the class that are not defined on the interface C. All components of the class D. The components of the interface for which alias names have been defined

15. 16. 17. 18.

EVENTS What is the statement for defining events? What is the statement for triggering events? Can events be defined in interfaces? Can events be triggered in interfaces?

Global, Abstract , Friend 19. Which of the following statements are correct? Choose the correct answer(s). A .You can create function modules using the Class Builder. B. A global class can contain a local class.. C. A global interface can contain a local interface. D. A global class can contain a local interface.. E. Nested definition of classes is when a local class is within a global class. F. UsingtheClass Builder, a local class can be converted into a global class. G. A local class can be copied using the Class Builder. The copy is then a global class.. H. You can use the Refactoring Assistant to move the methods to a different class within an inheritance hierarchy.. I .You can use the Refactoring Assistant to design model diagrams..

20.

For a user to be able to execute an object-oriented program, you always need to supply a module pool program or a function group program. Otherwise, there is nowhere for the CREATE OBJECT statement to create the instance. Determine whether this statement is true or false. True False Which of the following statements are correct? Choose the correct answer(s). A A non-abstract class can contain abstract methods. B An abstract class contains no implementations. C. An abstract method contains no implementations. D. Final classes cannot be superclasses within a class hierarchy. E A final method must be redefined. F Final classes can contain non-final methods. G A friend of a class is also a friend of its subclasses. H. The subclasses of a class's friend are also the class's friend. I. The visibility of an instance constructor can be limited.

21.

J. A private instance constructor (instantiation only by the class itself) can be defined in the private section.

Anda mungkin juga menyukai