Sunteți pe pagina 1din 25

1) In order to write generic programs, which can be used in different contexts polymorphism is a very strong

tool. Which technique is a basic requirement for polymorphism? Please choose the correct answer. ( Figure
77)

A) Up-Cast

B) Down-Cast

C) Equal-Cast

2) You detect an error in the coding of a standard SAP ABAP program. You need to correct this error in your
development system and transport it to your production system. How is this action called? Please choose
the correct answer. (Fig 88)

a) Correction

b) Repair

c) Modification

d) Hot fix

3) In your program you need the names of the fields of a structure wa_material at runtime. Therefore you
can use the RTTI classes. The root class is cl_abap_typedescr which provides a public static functional
method describe_by_data. This method returns a reference of type cl_abap_typedescr. You have defined a
reference r_descr as follows: DATA: r_descr TYPE REF TO cl_abap_structdescr. The class cl_abap_structdescr
is a sub class of cl_abap_typedescr. Which of the following statements is syntactically correct? Please choose
the correct answer.

A) R_Describe = Cl_Abap_Typedescr=>Describe_By_Data( Wa_Material ).

B) R_Describe != Cl_Abap_Typedescr=>Describe_By_Data( Wa_Material ).

C) R_Describe ?= Cl_Abap_Typedescr=>Describe_By_Data( Wa_Material ).

4) Your company uses a standard SAP report but wants to change its layout. You are assigned to do this.
What would be the best way to solve this task? Please choose the correct answer.

a) Personalize the standard SAP report.


b) Modify the standard SAP report.

c) Copy the standard SAP report and change the copy.

d) Create a Query based on the SAP report and change the query.

e) Build an Info set based on the SAP report and change the Info set.

5) You have implemented a class cl_customer where you have defined a private attribute name. From where
you can access the attribute name directly? There is more than one correct answer to this question. (2)

A) You Have Direct Access To The Attribute Name From All Methods Of The Class Cl_Customer Itself.

B) You Have Direct Access To The Attribute Name From All Methods Of All Sub Classes Of Cl_Customer.

C) You Have Direct Access To The Attribute Name From All Methods Of A Class Cl_Friend, Where
Cl_Customer Grants Friendship To The Class Cl_Friend.

D) You Have Direct Access to the Attribute Name from the Main Part of the Program

6) An SAP programmer has written a standard program in a way that it can call customer coding. You want
to implement this coding. How is this technique called? Please choose the correct answer.

a) Enhancement

b) Personalization

c) Modification

d) Repair

e) Correction

7) When you implement a class you can use most of the procedural ABAP statements within the class. But
some statements are forbidden. What is forbidden within class definitions? There is more than one correct
answer to this question. (3)

A) The Definition of Nested Structures.

B) The Definition of Internal Tables with Header Lines.

C) Typing With Like To Abap Dictionary Types.

D) The Tables Statement.

8) You want to add some fields to a standard SAP table using the append technique. What do you have to
keep in mind about this technique? There is more than one correct answer to this question. (2)
a) An append structure can be assigned to more than one table.

b) The fields of an append structure must start with ZZ or YY.

c) Append structures are not possible for tables containing a long field.

d) Append structures must be compared with the SAP original in a release upgrade.

e) The name of the append structure must start with ZZ or YY.

9) In A Class Cl_Vehicle You Need A Method Get_Fuel, Which Estimates The Fuel Consumption Of A Vehicle.
This Method Should Be Implemented As A Functional Method. How You Define A Functional Method And
Where You Can Use The Functional Method? There Is More Than One Correct Answer To This Question. (2)

A) A Functional Method Can Have Any Number of IMPORTING and EXPORTING Parameters

B) A Functional Method Has Exactly One Returning Parameter.

C) You Can Use A Functional Method Directly In An Arithmetic Expression.

D) You Can Use A Functional Method Directly In A WRITE Statement.

10) Which of the following enhancement techniques involves a modification from a technical viewpoint?
Please choose the correct answer. (Fig 110)

a) User Exit

b) Customer Exit

c) Business Transaction Event

d) Business AddIn (BAdI)

e) Enhancement Section

11) Class A provides friendship to class B. Class B provides friendship to class C. There is more than one
correct answer to this question. (2)

a) A is friend of B and C

b) B is friend of A

c) C is friend of B

d) B and C are friends of A

e) C is friend of A
12) Which statement will create an instance of a class? Please choose the correct answer

a) Class my_class definition

b) Create object my_object

c) Class my_class implementation

d) Data: my_object TYPE REF TO my_class

13) Which kinds of enhancements can BAdIs provide? There is more than one correct answer to this
question. (3)

a) Functional enhancements

b) Screen enhancements

c) Menu enhancements

d) Data element enhancements

e) Table enhancements

14) What syntax provides access to individual components of a class within the class? There is more than
one correct answer to this question. (2)

a) Call method ME->

B) Object instance->ME->

c) Call method object instance->ME->

d) ME->

15) What happen when the set handler command is executed? Please choose the correct answer?

a) The Event is handled

b) An instance of the event is created

c) The Event is triggered

d) The Event Handler Method is registered

16) Which of the following statements are correct? There is more than one correct answer to this question
(2) (Book Back Questions)
a) You can create function module using 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) Using the class builder, a local class can be converted into a global class.

17) In your team of ABAP developers there is some confusion concerning the relationship between
enhancement points, enhancement spots, enhancement sections, and BAdIs. Which statements about these
concepts are correct? There is more than one correct answer to this question (2)

(Fig 119)

A) Enhancement Spots Organize Explicit Enhancement Points, Enhancement Sections, And New Badis.

B) An Enhancement Spot Manages Either New Badis Or Explicit Enhancement Points And Enhancement
Sections.

c) Enhancement points organize explicit enhancement spots, enhancement sections, and new BAdIs.

d) An enhancement points manages either new BAdIs or explicit enhancement spots and enhancement
sections.

e) You can no longer use classical BAdIs

18) A customer asks you about implicit enhancement sections. What can you tell him? Please choose the
correct answer.

a) Using an implicit enhancement section you can add customer coding to a standard SAP program.

b) Using an implicit enhancement section you can change coding in a standard SAP program.

c) Using an implicit enhancement section you can add data declarations to a standard SAP program.

d) There are no implicit enhancement sections.

19) Why does SAP not recommend modifying standard SAP programs? There is more than one correct
answer to this question. (2)

a) To simplify upgrades to a new release.

b) To ensure smooth support from SAP.

c) To protect SAPs intellectual property.

d) To avoid performance problems.


20) What kinds of controllers exist within a Web Dynpro component? There is more than one correct answer
to this question. (4)

A) Exactly One Component Controller

B) Optional Custom Controllers

C) View Controllers

D) Windows Controllers

e) Application controllers

f) User controllers

21) Which of the following statements are correct? There is more than one correct answer to this question
(2)

a) An abstract class contains no implementation

b) An abstract method contains no implementation

c) A friend of a class is also a friend of its subclasses

d) The subclasses of a class friend are also the class friend

22) You can realize polymorphism between objects from different classes, if these classes are connected
over inheritance. For objects of classes which are not connected over inheritance there exists another
technique to achieve polymorphism. Over which of the following concept you can also achieve
polymorphism? Please choose the correct answer. (Fig 89)

A) The Friend Concept.

B) The Event Concept.

C) The Interface Concept.

23) Which of the following statement about inheritance are correct? There is more than one correct answer
to this question. (2)

a) Through inheritance, the public attributes of the super class are inherited to the sub class

b) Through inheritance, the private attributes of the super class are inherited to the subclass and they can be
addressed in the subclass directly using "ME->".

c) Through inheritance, the protected attributes of the super class are inherited to the subclass.
d) Through inheritance, the private attributes of the super class are inherited to the subclass and they can be
addressed in the subclass directly using "THIS->".

24) You want to create a Web Dynpro application in the object navigator SE80. What do you need to specify
in the Web Dynpro application? Please choose the correct answer.

a) A Web Dynpro component and a window within this component.

b) A Web Dynpro component and a controller within this component.

c) A Web Dynpro component and a context within this component.

d) A Web Dynpro component and an interface controller within this component.

e) A Web Dynpro Component and an Interface View within This Component.

25) You Want To Create A Web Dynpro Component With Two Views. The Selection View Contains Two Input
Fields For Departure And Arrival City And A Button To Trigger The Search For Flight Connections Between
These Two Cities. The Resulting View Contains A Table That Displays The Found Flight Connections And A
Button To Navigate Back To The Selection View. In Each View You Have Defined An Outbound Plug That Will
Be Fired By Pressing The Button On The View. Furthermore, You Have Defined An Inbound Plug In Each
View. Which Is The Easiest Way To Define The Navigation Structure Between The Two Views? Select The
Best Answer.

A) Embed Both Views In One Window. Within That Window, Connect The Outbound Plug Of The Selection
View With The Inbound Plug Of The Result View And The Outbound Plug Of The Result View With The
Inbound Plug Of The Selection View.

b) Embed each view in its own Window. Then connect the outbound plug of the selection view with the
inbound plug of the result view and the outbound plug of the result view with the inbound plug of the
selection view.

c) Create a combi view that contains two View Container UI element controls. Embed the combi view in a
Window, and the two other views in the View Container UI elements. Then connect the outbound plug of the
selection view with the inbound plug of the result view and the outbound plug of the result view with the
inbound plug of the selection view.

d) Create a combi window that contains two View Container UI element controls. Embed the two views in the
View Container UI elements. Then connect the outbound plug of the selection view with the inbound plug of
the result view and the outbound plug of the result view with the inbound plug of the selection view.

26) You want to display data in a view of a Web Dynpro component. However, the data you want to display
are stored in the context of the component controller. What is the best way to display the data? Please
choose the correct answer.

A) Bind the controls that display the data to the context of the component controller.

B) Copy the context of the component controller to the context of the view controller and bind the controls
that display the data to the context of the view controller.

C) Map The Context Of The Component Controller To The Context Of The View Controller And Bind The
Controls That Display The Data To The Context Of The View Controller.

d) Move the context of the component controller to the context of the view controller and bind the controls
that display the data to the context of the view controller.

e) Perform a MOVE-CORRESPONDING of the context of the component controller to the context of the view
controller and bind the controls that display the data to the context of the view controller.

27) What are direct parts of a Web Dynpro component? There is more than one correct answer to this
question. (4)

A) Views

B) Controllers

C) Contexts

D) Windows

E) Interfaces

F) Models

28) In the context of relationship between super and sub classes, identify the statements which apply?
There is more than one correct answer to this question. (2)

a) Subclass does not know its superclass

b) A subclass is a specialization of a superclass

c) A change in a superclass does not automatically get realized in the subclass

d) Superclass does not know its subclasses

e) A superclass is a specialization of a subclass

29) In the following, which are the standard hook methods for component controllers? There is
more than one correct answer (2)

a) wddobeforenavigation ()

b) wddobeforeaction ()

c) wddopostprocessing ()
d) wddomodifyview ()

30) What is the responsibility of a view within a Web Dynpro component? There is more than one correct
answer to this question (3)

A) A View Defines A Graphical Layout That Will Display In A Browser.

B) A View Defines The Navigation Structure Within A Web Dynpro Application.

C) A View Defines The Url For A Web Dynpro Application.

D) A View Defines The Events A User Can Trigger By Selecting Controls In The Display Area.

E) A View Stores Data for Display in Its Controller.

31) You want to implement a BAdI that provides a functional enhancement. What do you need to do? There
is more than one correct answer to this question. (2)

A) Define an interface for the BAdI.

b) Implement a class which implements the BAdI interface.

c) Identify the name of the BAdI.

d) Call the BAdI.

E) Create an enhancement project with CMOD.

32) An element that is not yet part of the context node can be added to the node by using which of the
following method, which refers to the node reference? Please choose the correct answer.

a) bind elemnt( )

b) bind_element( )

c) bind structure( )

d) bind_strucuture( )

33) SAP programmers can supply you with default subroutines, which of the following include can
be used for default subroutines? Please choose the correct answer.

a) ZXaaaF01

b) ZXaaaU01
c) LXaaaF01

b) LXaaaU01

34) Which of the following offers a range of user friendly options for you to change repository
objects that you created previously? Please choose the correct answer. (Fig 129)

a) Modification assistant

b) Refactor assistant

c) Enhancement assistant

d) Refactoring assistant

35) Which of the following class statement is used, you can prevent the instantiation of a class?
Please choose the correct answer.

a) Friendship class

b) Singleton class

c) Abstract class

d) Final class

36) Which of the following are the advantages of the singleton nodes? There is more than one correct
answer to this question. (2)

a) Lazy data access

b) Multiple accessing of backend logic

c) Less memory consumption

d) More memory consumption

37) In the following which are the different types of layout property? There is more than one correct answer
to this question. (3)

a) Flow layout

b) Column layout

c) Row layout

d) Matrix layout
38) Which of the following statement can be used to change the value of any attribute of the node element?
Please choose the correct answer.

a) get_attribute( )

b) get_static_attribute( )

c) set_attribute( )

d) set_static_attribute( )

39) In modification mode you cannot use all of the normal functions of the tool with which you are
working. Which of the following modification assistant icons are used in the abap editor? There is
more than one correct answer to this question. (3)

a) Insert

b) Modify

c) Delete

d) Undo modification

e) Append

40) Which of the following is an option that allows you to add source code, variable declarations and
parameter declaration to sap programs without having to make a modification? Please choose the correct
answer.

a) Implicit enhancement section

b) Explicit enhancement section

c) Explicit enhancement point

d) Explicit enhancement spot

e) Enhancement point

41) You are an ABAP consultant and your customer asks you to list the benefits of moving from a Non-
Unicode to a Unicode system. There is more than one correct answer to this question. (2)

a) A Unicode System Can Support Users of Different Cultures.


b) A Unicode system automatically translates between different cultures.

c) A Unicode system needs less database storage space.

d) Transfer Of Character Data Between Two Unicode Systems From Different Cultures Is Easier Than
Between Non-Unicode Systems.

e) In Unicode systems characters are always stored using UTF-8 encoding.

42) You review an ABAP program that needs to be migrated to a Unicode system. The program opens a data
set to read a text file into an internal table. How do you need to modify the OPEN DATASET statement so
that your program will run on a Unicode system? Please choose the correct answer.

A) Add The Extension In Binary Mode.

B) Add The Extension In Text Mode.

C) Add The Extension In Unicode Mode.

D) Use Opent Textfile Instead Of Open Dataset.

E) Use Open Unicode Instead Of Open Dataset.

43) You Review An ABAP Program That Needs To Be Migrated To A Unicode System. Within The Program,
The Two Data Objects City And Member Are Declared In The Following Way:

DATA City (20) TYPE C.


DATA: BEGIN OF Member,
First name (20) TYPE C,
Age TYPE I,
City (20) TYPE C,
END OF Member.

The Program Contains the Following Line: City = Member+44(20). Why Does This Line Not Work As Expected?
Please Choose The Correct Answer.

a) Because the syntax is incorrect.

b) Because the fragment view of member contains non-character data.

c) Because You Can Not Read Beyond Non-Character Data Within A Structure Using The Offset Notation.

d) Because an integer has 8 bytes.

44) Which of the following can you Control Using the Field Catalog of a Sap Alv Grid Control? There Is More
Than One Correct Answer To This Question. (3)
A) Set The Output Characteristics Of A Column, Such As The Column Position Or Width.

B) Influence The Format Properties Of Column Contents, Such As The Number Of Decimal Places Or The
Alignment Of The Content Of A Cell.

C) Output The List In A Striped Pattern.

D) Specify The Colors Of The List Rows.

E) Hide The List Columns.

45) In global class CL_GUI_ALV_GRID that is delivered by SAP, the DOUBLE_CLICK event is defined, which is
triggered when a cell in the list is double-clicked. You have written a program in which data is displayed in a
list using class CL_GUI_ALV_GRID. What do you have to do in your program to respond to the event? There
is more than one correct answer to this question. (3)

A) Create Your Own Handler Class.

B) Write A Handling Method For The Event.

C) Capture The Event With The Catch Statement.

D) Register On The Event Using The Set Handler Statement.

46) You want the system to output a list in the program using the SAP ALV grid control. In which order do
you have to carry out the following steps in the program to achieve this? Please choose the correct answer.

a) CREATE CUSTOM CONTAINER AREA,


CL_GUI_CUSTOM_CONTAINER..
CL_GUI_ALV_GRID,
SET_TABLE_FOR _FIRST_DISPALY.

b) CL_GUI_CUSTOM_CONTAINER..
CL_GUI_ALV_GRID,
CREATE CUSTOM CONTAINER AREA,
SET_TABLE_FOR _FIRST_DISPALY.

c) SET_TABLE_FOR _FIRST_DISPALY.
CL_GUI_CUSTOM_CONTAINER..
CL_GUI_ALV_GRID,
CREATE CUSTOM CONTAINER AREA

d) CL_GUI_ALV_GRID,
CL_GUI_CUSTOM_CONTAINER..
SET_TABLE_FOR _FIRST_DISPALY.
CREATE CUSTOM CONTAINER AREA,

47) You like to create a list with the global class CL_GUI_ALV_GRID. In this class the event DOUBLE_CLICK is
defined, in that way that if a user makes a double click with his mouse on the list, the event would be raised.
In your case every time the user makes a double click on the list a popup should appear which shows the
number of the line on which has been double clicked. What do you have to do therefore? There is more than
one correct answer to this question (2)

A) Define A Local Class In Which The Event DOUBLE_CLICK Is Redefined And Raised.

B) Write a Handler method for the event DOUBLE_CLICK of the class CL_GUI_ALV_GRID, Which calls the
popup.

C) Catch The Event DOUBLE_CLICK With The CATCH Statement Under Which The Popup Call Is Implemented.

D) Register for the event DOUBLE_CLICK by using the statement SET HANDLER.

48) In the following, Sap provides two ways to add tables and structures to fields? There is more than one
correct answer (2)

a) Append structure

b) Customizing include

c) Append include

d) Customizing Structure

49) In the following, while updating database you can update? Please choose the correct answer.

a) Only single records

b) Only several records

c) Both single and several records

d) None of the above

50) When a program is called, you cannot pass data through? Please choose the correct answer.

a) Call interface

b) Sap memory

c) Abap memory

d) Internal table

51) What is the result of a list output in a non-unicode system, and what is the result in a Unicode system?
DATA field (5) TYPE c VALUE ‘ABCDE’. Write field +1(4)?
Please choose the correct answer.

a) ABCD
b) BCDE

c) ABCDE

d) CDEAB

52) For which of the following predefined data types should you use the original variants of the standard
string processing statement or the optional IN CHAR MODE addition?
Please choose the correct answer.

a) D,X,N,String

b) C,X,N,String

c) D,C,T,N,String

d) D,T,Xsring

53) Identify the only method found in class CL_GUI_CUSTOM_CONTAINER? Please choose the correct
answer.

a) Destructor

b) Class

c) Constructor

d) Refresh

54) What is the effect of translate statement on the string ‘andaman’ for the character ‘a’ to ‘c’. Please
choose the correct answer.

a) cndaman

b) cndcmcn

c) cndcman

d) cndamcn

55) What is the concept underlying the sap-luw? Please choose the correct answer.

a) All principle

b) All and nothing principle

c) All or nothing principle


d) None of the above

56) In the following, which is the complete data type? Please choose the correct answer.

a) I, f, d, t

b) I, f, d, t, string, xstring

c) P, n, x

d) C, I, p

57) In which dictionary can you create a global structure? Please choose the correct answer.

a) In the data dictionary

b) In the abap dictionary

c) In the sap dictionary

d) None of the above

58) For which of the following predefined data types should you use the new compare operators
BYTE-CO, BYTE-CA for compares? Please choose the correct answer.

a) String, c

b) X, string

c) X, XString

d) C, N

59) In the following which method can be used to pass the list data, the field catalog, and other
additional information to the representative instance? Please choose the correct answer.

a) set_table_first_display

b) set_table_for_first_display

c) set_first_table_for_display

d) get_table_for_first_display
60) For an event handler method to react to a triggered event, you must define at runtime the
trigger to which it should react. Which of the following statement links a list of handler
methods with the event triggers? Please choose the correct answer.

a) Get handler

b) Set handler

c) Event handler

c) All are wrong

61)What items are true about Inheritance


A. Superclass private components are visible to all subclasses
B. Superclass protected components are visible to all subclasses
C. Superclass private components are visible only within the subclasses
D. Superclass public components are visible to all classes

62)______________ (enter the correct phrase from one of the answers below) of a class
ensures that it can guarantee its own consistency
A. static methods
B. private attributes
C. public attributes
D. functional methods

63)The concept of restricting direct access to data via hidden internal processes is best
represented by which term
A. Inheritance
B. Encapsulation
C. Instantiation
D. Polymorphism

64) What would happen if the public components of a class were changed
A. Inheritance becomes invalidated
B. Nothing. The class maintains it's own status
C. private components will also need to be changed

65) Identify the valid rule when calling public methods from within the class
A. When calling a static method, the class name is required
B. Private methods can not call public methods
C. When calling a static method, the class name can be omitted
D. When calling an instance method, the => operator is still required

66) Mark the invalid attribute definitions

class lcl_course definition.

10 public section.
20 Data: school(20) type c,
30 Supervisor type string default ‘ADAMS’,
40 Price(3) type p decimals 2 value 100 READ-ONLY.
50 types: type_category(15) type c,
60 type_name(10) type c.
70 constants: write_position type i value 10.
80 class-data: course_count type i.
90 private section.
100 data: category(15) type c,
110 name(10) type c,
120 courseid like mara-matnr.

endclass.

A. 30,120
B. 40, 120
C. 40,70
D. 30,80
E. 70,80

67) What is the only component that is implemented in the implementation part of a
class
A. Event
B. Object
C. Interface
D. Method
E. Attribute

68) What component provides the Point of Contact for outside users
A. Method Signature
B. Private Attributes
C. Instantiated Object
D. Public Attributes

69) What name is always given to a static constructor?


A. class_constructor
B. class=>constructor
C. constructor
D. static_constructor

70) Define characteristics of Polymorphism


A. it’s one of the main strengths of inheritance
B. the same method is implemented in different ways by redefining the method in
subclasses
C. methods of the same class react differently to the same method call
D. methods from classes react differently to the same interface

71) What tool or technique would be used to move the definition of a global class to
an implemented interface
A. Refactoring Assistant
B. BOR
C. Web Dynpro
D. Object Navigator
E. BAPI wizard

72) Refer to the following code and Select the VALID method call
Class lcl_course definition.
Public section.
data: course_name(12) type c.
methods: display_price importing im_course_name type string.

Private section.
Data: price type P value 100.
constants: c_objects101(10) type c value 'OBJECTS101'.

endclass.

class lcl_course implementation.

method display_price.
course_name = im_course_name.
If course_name = c_objects101.
Write: price.
Endif.
endmethod.

endclass.

Data obj_course type ref to lcl_course.

start-of-selection.

create object obj_course.


A. Call method obj_course->display_price exporting course_name = 'OBJECTS101'.
B. Call method obj_course->display_price importing im_course_name =
'OBJECTS101'.
C. Call method obj_course->display_price exporting im_course_name =
'OBJECTS101'.
D. Call method obj_course->display_price exporting im_course_name =
c_objects101.

73) Constructors have special considerations.


(Identify the incorrect statement below.)
A. Only Import and Exception Parameters are allowed
B. The Constructor must defined in the Public section
C. Generally, constructor methods can not be called
D. A class can have multiple constructors

74) What statement will request memory to be allocated to an object


A. Create Constructor
B. Call Constructor
C. Create Object
D. Call Method

75) A program needs to gain access to the public attributes of class lcl_course.
Identify the statements that are valid.
class lcl_course definition.

public section.
data: name(15) type c value 'ABAPObjects101'.
class-data price type p value 100.

private section.
data: category(10) type C value 'Objects'.

endclass.
data: course1 type ref to lcl_course,
course_name type string,
course_price type p,
course_category type string.

+Create Object course1.


A. course_price = lcl_course=>price.
B. course_name = course1=>name.
C. course_name = course1->name.
D. course_price = lcl_course->price.
E. course_name = name

76) Choose the correct redefinition of the superclass method in class lcl_super_course
*Super Class Definition
CLASS lcl_super_course DEFINITION.
PUBLIC SECTION.
METHODS: get_course_name IMPORTING im_name type string.
ENDCLASS.

*Sub Class Method ReDefinition


A
CLASS lcl_sub_course DEFINITION INHERITING
FROM lcl_super_course.
PRIVATE SECTION.
METHODS: get_course_name IMPORTING im_name type string.
ENDCLASS.

B
CLASS lcl_sub_course DEFINITION INHERITING
FROM lcl_super_course.
PUBLIC SECTION.
METHODS: get_course_name IMPORTING im_name type string.
ENDCLASS.

C
CLASS lcl_sub_course DEFINITION INHERITING
FROM lcl_super_course.
PRIVATE SECTION.
METHODS: get_course_name REDEFINITION.
ENDCLASS.

D
CLASS lcl_sub_course DEFINITION INHERITING
FROM lcl_super_course.
PUBLIC SECTION.
METHODS: get_course_name REDEFINITION.
ENDCLASS.

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

78) How do you call the method in a superclass that has the same name as a
redefined method in the subclass?
A. Call Method Super-> mymethod
B. Call Method Superclass-> mymethod
C. You can’t. Only the redefined method can be called
D. Call Method mymethod

79) 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. Exceptions
B. Exporting
C. Changing

80) An inherited class :


A. can not access the protected components
B. can remove superclasss components
C. can access the inherited private components
D. can add components over and above the superclass
E. can redefine the public methods of the superclass

81) What is possible with a subclass in an inheritance relationship to the superclass


A. can provide inherited methods with new implementations (redefinition)
B. The subclass can remove components of the superclass
C. inherits all the characteristics of the superclass
D. can add new components to the subclass
E. Components defined in the superclass are not present in the subclass unless they
are explicitly defined in the definition of the subclass

82) How do you call the method in a superclass that has the same name as a
redefined method in the subclass ?
A. Call Method Super-> mymethod.
B. Call Method Superclass-> mymethod.
C. You can't . Only the redefined method can be called
D. Call Method mymethod

83) Refer to the following code and identify the statements that are TRUE
________________________________________
CLASS lcl_course DEFINITION.
PUBLIC SECTION.
METHODS: get_course_name IMPORTING im_name type string.
CLASS-METHODS: list_prices_and_discounts.
ENDCLASS.
CLASS lcl_course IMPLEMENTATION.
METHOD get_course_name.
ENDMETHOD.
METHOD list_prices_and_discounts.
ENDMETHOD.
ENDCLASS.
Data: course1 type ref to lcl_course,
course2 type ref to lcl_course.
Start-of-selection.

Create object course1.


Course2 = course1.
(More than one answer is correct)
A. method list_prices_and_discounts is a static method
B. list_prices_and_discounts is a instance method
C. Method list_prices_and_discounts can only be called once
D. Memory is reserved for 2 instances of lcl_course

84) UML provides various diagram types. Mark the valid UML diagrams
A. Composition
B. Component
C. Aggregation
D. Behavior
E. Class

85) What triggers an event


A. Raise Event
B. Raise Event Inside the Method
C. All answers are correct
D. Call Method

86) Changing the view of an instance of a class with more details is referred to as
A. widening cast
B. narrowing cast
C. up cast
D. dynamic referencing

87) When redefining methods in a subclass, what is allowed?


A. Only Instance methods
B. Private Static methods
C. Code can be changed
D. Signature can be changed

88) Choose the short form of the method call below


A. call method rf_car->calculate_cost importing ex_size = v_size.
B. rf_car->calculate_cost( importing ex_size = v_size ).
C. rf_car->calculate_cost importing ex_size = v_size.
D. calculate_cost( importing ex_size = v_size ).
E. rf_car->calculate_cost (importing ex_size = v_size).

89) What is contained in a class that does not exist in an interface


A. method
B. implementation
C. attributes
D. definition

90) Select the answers that apply to static methods and instance methods
A. Static methods MUST be addressed by class_name even when object is
instantiated
B. Static methods MUST be addressed by object reference after instantiation
C. Instance methods MUST be addressed by class name
D. Instance methods MUST be addressed by object ref after instantiation

91) What can be said about the visibility of attributes in the following code

CLASS lcl_course DEFINITION.


PUBLIC SECTION.
Data: name type string.
PRIVATE SECTION.
Data: price type course-price.
ENDCLASS.
A. name is available to methods only inside the class
B. price is available to methods inside the class
C. price is protected from outside access
D. name is protected from outside access

92) Mark the items that characterize some primary differences between objects and
functions
A. A program can directly access data in the function group while access to data in
an object is not possible
B. Functions allow multiple instances of the same data objects. Objects only allow
single instances of data
C. Calling a function loads the entire function group implicitly into memory whereas
instances of an object are generated explicitly when an object is created
D. A program can only work with a single instance of the same function group versus
a program can access several instances of the same object

93) Mark the operators used to widen cast of a class


A. =>
B. ->
C. =
D. ?TO
E. ?=
F. =?

94) 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. Exporting
B. Changing
C. Exceptions
D. Receiving

95) A program needs to gain access to the public attributes of class lcl_course.
Identify the statements that are valid.
class lcl_course definition.
public section.
data: name(15) type c value 'ABAPObjects101'.
class-data price type p value 100.
private section.
data: category(10) type C value 'Objects'.
endclass.
A. data: course1 type ref to lcl_course,
B. course_name type string,
C. course_price type p,
D. course_category type string.

96) What is the only component that is implemented in the implementation part of a
class
A. Event
B. Interface
C. Method
D. Attribute
E. Object

97) Initializing an object in a subclass requires that the constructor of the superclass
is first called. Identify the correct syntax.
A. Call Method Super Constructor
B. Call Method Super-> Constructor
C. Call Method Constructor-> Super
D. Call Method Constructor

98) Define characteristics of Polymorphism


A. methods from classes react differently to the same interface
B. the same method is implemented in different ways by redefining the method in
subclasses
C. it’s one of the main strengths of inheritance
D. methods of the same class react differently to the same method call

99) Choose the item that is not characteristic of redefinition in the context of
super/sub class inheritance.
A. The signature of the method must remain the same
B. Attributes and class methods can be redefined.
C. Only instance methods can be redefined
D. Constructor methods can't be redefined

100) Identify the statements that best describe the visibility of classes
A. Global classes are centrally available to all ABAP programs
B. Global Classes are available only from programs belonging to the same
development class
C. Local Classes are available only to programs in the same development class
D. Local Classes are available only to the program where the class is defined

101) When redefining methods in a subclass, what is allowed?


A. Signature can be changed
B. Only Instance methods
C. Code can be changed
D. Private Static methods

102) What is the number of super classes that can exist for a given subclass
A. only many
B. none
C. only 1
D. 1 or many

103) Using example code below, choose the correct syntax for the redefined
method
Class lcl_car definition.
Public Section.
method calc_speed importing im_distance type ty_dist.
End Class.
A. Method calc_speed Redefinition.
B. Method calc_speed importing im_distance Redefinition
C. Method calc_speed Redefinition importing im_distance type ty_dist.
D. Method calc_speed importing im_distance

104) Identify the characteristics of the self reference ME


A. Self references allow an object to give other objects a reference to it.
B. The self-reference ME can be used to access individual components
C. All answers are correct
D. None of the answers are correct

S-ar putea să vă placă și