For preparation for SAP ABAP certification. This was taken from another website ( http://www. Esnips. Com/doc/69f7a006-bef6-474e-97b7-35e9dae6af72/TAW10-2- 2-Objetos or http://www. Scribd. Com/doc/6912147/TAW10-22-Objetos ) where the answers were already provided.
Course_name = name
Name can not be accessed unless course1 is instantiated
Course_name = course1=>name
Course_name = course1->name
Course_price = lcl_course=>price
Instantiation
Encapsulation
Inheritance
Polymorphism
Call method Objref=>method
Call Method->Objref
Call Method (from within another instance method)
Call method Objref->method
CALL METHOD object instance->ME->
ME->
CALL METHOD ME->
Object instance->ME
Events can only have exporting Parameters
Exporting paramets can only be passed by reference
Exporting parameters can only be passed by value
Events can only have importing Parameters
Event handler methods are called in the sequence that they were registered in the handler table
There is a separate handler table for every object that has defined events
Registered Methods in the handler table can only be triggered by RAISE EVENT i.e. not by CALL METHOD
A single SET Handler command can be used to register multiple handler methods in the handler table
Exceptions
Exporting
Changing
Receiving
Users of the private components must change their interface
Any programs accessing the class must also change
Programs are insulated from change
None of the answers are correct
Does not allow for methods to be redefined in subclasses
Cannot be shared
Exist once per roll area
Receive their own copy of the static attribute for each subclass
Events can be triggered with the "Trigger Event" command
Methods must be registered to an event in order to be called when the event is triggered
An event is defined in the Implementation of a Class
Event Triggering using "Raise Event" can be issued in a method
Can remove superclass components
Can add components over and above the superclass
Can access the inherited private components
Can redefine the public methods of the superclass
Cannot access the protected components
Implementation
Attributes
Method
Definition
By methods of a different object within the same program
Only by methods of the specific object itself
By methods of a different instance of the same object
From outside the class
The sublass is invalidated.
A syntax message will occur
The superclass is invalidated
A runtime error will occur
Polymorphism
Inheritance
Encapsulation
Casting
Instantiation
EXPORTING Parameters for events can only be passed by value
EXPORTING Parameters for events can only be passed by reference
Events can only have EXPORTING parameters
Events also allow RETURNING parameters
Code can be changed
Only Instance methods
Signature can be changed
Private Static methods
It’s a characteristic when methods of the same class react differently to the same method call
It’s one of the main strengths of inheritance
It’s a characteristic when methods from different classes react differently to the same interface
The same method is implemented in different ways by redefining the method in subclasses
It’s a characteristic when objects from different classes react differently to the same method call
Object instantiation part of a program
Implementation part of a class
Definition part of Class
Call method of the Class
The system looks for registered handler methods In the registry table and processes those that are registered for the event
The system looks for registered handler methods In the event handler internal table and processes those that are registered for the event
The methods defined in the Class Definition listen for raised events and respond when an event is triggered
It is determined by the RAISE Event command
Course_price = lcl_course=>price
Course_name = course1->name
Course_name = course1=>name.
Course_name = name
Course_price = lcl_course->price
C is a friend of A
C is friend of B
A is friend of B and C
B and C are friends of A
B is friend of A
Refvar->method returning()
Refvar->method(p1)
Refvar->method(im = p1)
Refvar->method receiving()
Events
Methods
Attributes
All of the answers are correct
None of the answers are correct
Call Method Super Constructor
Call Method Super->Constructor
Call Method Constructor
Call Method Constructor->Super
Course_price = lcl_course=>price. Write course_price.
Write: price.
Write lcl_course=>price.
Write lcl_course->price
Call method class name->method
Call method class name=>method
Call class-method
Call Method->class name
Raise Event inside the Method
Call Method
None of the answers are correct
Raise Event
All answers are correct
Price is protected from outside access
Price is available to methods inside the class
Name is available to methods only inside the class
Name is protected from outside access
=>
=?
->
?=
=
Local Classes are available only to the program where the class is defined
Global classes are centrally available to all ABAP programs
Local Classes are available only to programs in the same development class
Global Classes are available only from programs belonging to the same development class
Narrowing cast
Up cast
Widening cast
Dynamic referencing
An instance of the event is created
The Event Handler Method is registered
The Event is triggered
The Event is handled
Can change the state of an object
Can access only public attributres in their class
Can access all atributes in their class
Can be defined with a parameter interface
Only pass return codes to the calling program
Cl_grid points to the object that communicates with the ALV grid control
Cl_grid points to the object that communicates with the container control
Cl_container points to the object that communicates with the ALV grid control
Cl_container points to the object that communicates with the container control
R3TR CLASS
R3TR LOCAL CLASS
None of the answers are correct
R3TR ZCL CLASS
R3TR lcl_class
Super class and subclass both point to an instance of the same class type
Casting a super class to a subclass when superclass does not point to an instance of the subclass type
Subclass reference variable corresponds to the superclass reference variable
Super class method is called from the subclass
Call method obj_course->display_price exporting im_course_name = 'OBJECTS101'.
Call method obj_course->display_price importing im_course_name = 'OBJECTS101'.
Call method obj_course->display_price exporting course_name = 'OBJECTS101'.
Call method obj_course->display_price exporting im_course_name = c_objects101.
Method calc_speed importing im_distance.
Method calc_speed Redefinition.
Method calc_speed importing im_distance Redefinition
Method calc_speed Redefinition importing im_distance type ty_dist.
All answers are correct
An object exists for as long as it is being used in the program
An object exists for as long as at least one reference points to it
An object exists as long as at least one method of the object is registered as an event handler.
R3TR ZCL CLASS
None of the answers are correct
R3TR CLAS cl_course
R3TR cl_course
R3TR GLOB CLASS
Call Constructor
Create Object
Call Method
Create Constructor
Method list_prices_and_discounts is a static method
Method list_prices_and_discounts can only be called once
List_prices_and_discounts is a instance method
Only one instance of method get_course_name exists
Only one instance of method list_prices_and_discounts exists
No answers are correct
All answers are correct
Methods cannot be explicitly designated as FINAL
Contains final methods implicitly
Cannot have subclasses
Get_city is a public attribute
Address is protected attribute
Display_address is a public method
Display_address is a static public method
Display_address is a private method
The subclass can remove components of the superclass
Can add new components to the subclass
Can provide inherited methods with new implementations (redefinition)
Inherits all the characteristics of the superclass
Components defined in the superclass are not present in the subclass unless they are explicitly defined in the definition of the subclass
The user is protected from the actual implementations
Interfaces describe the point of contact of a class
Interfaces contain their own implementation part
A class can implement any number of interfaces
Instance methods MUST be addressed by object ref after instantiation
Static methods MUST be addressed by object reference after instantiation
Instance methods MUST be addressed class name
Static methods MUST be addressed by class_name even when object in instantiated
When calling a static method, the class name is required
When calling an instance method, the => operator is required
When calling a static method, the class name can be omitted
Private methods can not call public methods
Object Instance
Class Methods
Class Implementation
Class Definition
Quiz Review Timeline +
Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.
Wait!
Here's an interesting quiz for you.