In computer programming, polymorphism is the provision of a single interface to entities of different types. Trust me, only tech nerds can get this language. If you are one, test your knowledge of the basic requirements for polymorphism below.
TRUE
FALSE
Rate this question:
An instance attribute that is automatically given a unique identification by the system when an object is created.
An instance method for initializing the attributes of an object; it is automatically called by the system during CREATE OBJECT.
An instance method for controlling how much main memory is to be reserved for an object.
Rate this question:
YES
NO
Rate this question:
You use the reference ME within a class solely to reference the private methods of the class itself.
You use the reference ME within a class to call attributes and methods of the class itself.
You use the reference ME within a class solely to reference the private attributes of the class itself.
Rate this question:
YES
NO
Rate this question:
TRUE
FALSE
Rate this question:
Through inheritance, the public attributes of the super class are inherited to the subclass.
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->".
Through inheritance, the protected attributes of the super class are inherited to the subclass.
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->"
Rate this question:
In a static method, Instance attributes can also be used, provided they area declared as READ ONLY.
Instance methods can use both static as well as instance components in their implementation part.
Both static as well as Instance attributes are declared using the DATA statement.
Static methods can be called through the class: =>.
Static attributes exist only once for each class.
Rate this question:
Typing with LIKE to ABAP Dictionary types.
The definition of Internal Tables with header lines.
The TABLES statement.
The definition of Internal Tables without header lines.
Typing with TYPE to ABAP Dictionary types.
Rate this question:
All objects of the same class contain the same number of attributes and methods after being created.
You can preset different objects of a class with different values inmediately when they are being created.
The contents of the attributes of different objects in a class always contain the same content or value inmediately after being created.
You define the type and number of attributes of an object through the correspoding class.
Rate this question:
Redefined components of the superclass
Newly defined components of the subclass
Inherited components of the superclass
Redefined components of the subclass
Rate this question:
CREATE OBJECT ref_cl.
CREATE OBJECT ref_if TYPE cl_document.
DATA class_name TYPE string. class_name = "CL_DOCUMENT". CREATE OBJECT ref_if TYPE (class_name).
CREATE OBJECT ref_if.
Rate this question:
A friend of a class access to the public attributes of the class allowing the friendship.
A subclass of a friend class has automatic access to the private attributes of the class allowing the friendship.
A friend of a class has access to the private attributes of the class allowing the friendship.
The allowing of a friendships is not inherited.
Rate this question:
Narrowing Cast.
Redefinition of methods (for polymorphism through inheritance).
Widening Cast.
Implementation of methods of an insterface in the respective classes (for polymorphism through inheritance).
Rate this question:
You can call methods in ABAP objects in the same way as function modules.
You can call methods only within ABAP Objects classes.
Like form routines or function modules, methods are a means to modularize software.
Similar to the case with function modules, you hace the option with methods of marking parameters as "optional".
Rate this question:
You can create function modules using the Class Builder.
A global class can contain a local class.
A global interface can contain a local interface.
A global class can contain a local interface.
A nested definition of classes is when a local class is within a global class.
Rate this question:
Interfaces actually stand for an interface (protocol) between a client (interface user) and a server (implementing class).
Interfaces are used to call static components of a class.
Using interface references you can reference all the public components of an object that have been defined in the corresponding interface-implementing class.
A client (caller) can use inteface reference to access all methods of the Interfaces and thus archive polymorphism behavior.
Using interfaces you can simulate multiples inheritance.
Rate this question:
Redefined components of the superclass
Newly defined components of the subclass
Inherited components of the superclass
Redefined components of the subclass
Rate this question:
The singleton class must have a class method implemented in which the CREATE OBJECT call is programmed for this one object.
The singleton class must hace the addition CREATE PRIVATE in the definition part.
In the singleton class, there must be an even defined that is triggered when the first and only object is created and also prevents further objects of this class from being created.
The singleton class must have an instance method implemented in which the CREATE OBJECT call is programmed for this one object.
The CREATE OBJECT call for this one object can take place in the class constructor of the singleton class.
Rate this question:
Quiz Review Timeline (Updated): Mar 21, 2023 +
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.