Questions
ayuda
option
My Daypo

ERASED TEST, YOU MAY BE INTERESTED ONABAP 7.4 - Chapter 14 - ABAP Object-Oriented Programming

COMMENTS STATISTICS RECORDS
TAKE THE TEST
Title of test:
ABAP 7.4 - Chapter 14 - ABAP Object-Oriented Programming

Description:
ABAP 7.4 - Chapter 14 - ABAP Object-Oriented Programming

Author:
ONKIDONKI
(Other tests from this author)

Creation Date:
21/04/2017

Category:
Others

Number of questions: 37
Share the Test:
Facebook
Twitter
Whatsapp
Share the Test:
Facebook
Twitter
Whatsapp
Last comments
No comments about this test.
Content:
Classes in ABAP Objects can be declared globally as repository objects, but not locally True False.
The three visibility areas are: (There are three correct answers) Private Public Protected Local Global.
What is correct to say about global classes: (There are four correct answers) Global classes and interfaces are stored in ABAP dictionary and are visible system wide Global classes can be used by every program in the system Public instantiation means that the user can create an instance of this class with the CREATE OBJECT statement, usually you select it. Protected instantiation specifies that only inherited classes or the relevant class itself can create the instances of this class Private instantiation specifies that only the classes from the respective package can create instances Abstract instantiation defines an abstract class.
What is correct to say about Global Classes definition: (There are four correct answers) Usual ABAP Class means a standard ABAP class Persistent Class means a mapping of ABAP Objects classes to relational database tables is referred to as object-relational mapping or O/R mapping Exception Class are special classes which are used to carry out every error treatment and database read consistency Test Class is a test call that can be also instantiated Final means you cannot create the subclass for this class Only Modeled means tha the class is not stored in the class library, and you cannot address it at runtime or test it.
What is correct to say about Class Visibility and Instantiation: (There are four correct answers) All components declared within the protected section can be accessed by any users of the class The methods of the class can also access the public components of the class and any classes that inherit from it The private components of the class form the interface between the class and the user The components that are declared in the private section are only visible to the method of the class and are only accessible from inside the class itself The private components are not visible to the outside user, you can encapsulate the information from the outside user All components declared as Protected can be accessed by the method of the class and the subclasses Private components represent the interface between the class and its subclasses.
What is correct to say about instantiation of a local class: (There are two correct answers) If you do not specify the instantiation for the class, then the class is as protected instantiated by default The user can use only publicly instantiated classes to create objects for the class Public instantiation classes normally provide a static component that can be accessed by the outside, which will provide the reference to the object that the class itself created.
What is correct to say about Instance and Static Components: (There are three correct answers) The instance components exist for each instance of the class, and they are independent of each other The static components exist once per class, no matter how many instances of this class there are The static components are addressed using the reference variable pointing to the object in question The static components are addressed using the name of the class to which they belong You also need to create an instance of the class (object) to access the static components.
What is correct to say about Attributes: (There are four correct answers) Attributes are internal data objects within a class that can have any data type Attributes can have local types, global data types, or reference data types In classes, you can use the TYPE addition only when defining attributes. The LIKE reference is also allowed for every data type With TYPE REF TO, the attribute can be typed as a reference variable The READ-ONLY addition means that a public attribute that was declared with the DATA statement can be read from outside but can only be changed by methods of the same class. The READ-ONLY addition can be specified only in the public visibility section of a class declaration or in an interface definition.
What is correct to say about Attributes: (There are three correct answers) Private attributes cannot be addressed directly from outside the class and are not visible to the outside user. The friendship concept is an exception to this rule Public attributes can be accessed directly by the outside user Static attributes are defined with the DATA keyword and exist once per object Instance attributes are defined with the CLASS-DATA keyword, and they exist once per class, no matter how many instances there are for the class You can declare constant attributes, whose values are defined during declaration and cannot be changed afterward.
What is correct to say about Methods: (There are six correct answers) Are internal procedures in a class that define the behavior of an object Methods can access all attributes of the class and therefore can change the values of the attributes of the object The public attributes of the class can only be changed by the method of the same class Methods assigned to the PUBLIC SECTION can be called from outside the class Methods assigned to the PRIVATE SECTION can be called only within the same class You can declare instance methods or static methods Static methods can access all of the attributes of the class and can trigger all events of the class Static methods can access only the static attributes of the class and can trigger only static events.
Methods have interface parameters, sometimes known as signatures, that enable them to receive values when they are called and pass values back to the calling program. What is correct to say about? (There are five correct answers) The DEFAULT addition always allows you to specify a default value Methods can have any number of EXPORTING, IMPORTING, and CHANGING parameters, which are mutually exclusive EXPORTING, IMPORTING, and CHANGING parameters can be passed by value or reference A single return value for the method can be defined using a RETURNING parameter. Methods that have a RETURNING parameter are called functional methods. Even if a method has a RETURNING parameter, there can be EXPORTING or CHANGING parameters The RETURNING parameter must always be passed by reference. All input parameters, such as IMPORTING and CHANGING, can be defined as optional using the OPTIONAL addition.
What is correct to say about exceptions in the methods: (There are three correct answers) Methods can set the system return code SY-SUBRC if they raise an exception, but only if the exceptions raised by the method are class-based exceptions For class-based exceptions the Exception Classes checkbox is selected Class-based exceptions are raised by either the RAISE EXCEPTION statement or the runtime environment. To propagate an exception from a method, you generally use the RAISING addition when you are defining the method interface. You can specify the RAISING addition directly when you define the methods of local classes.
What is correct to say about the constructor method: (There are three correct answers) Called automatically when you create an object to set a starting value for the new object The instance constructor is called once per object, for every object. Each class can have more than one CONSTRUCTOR method, and the constructor method must always be defined in the public visibility section The constructor signature can only have importing/exporting parameters and exceptions. The instance is not created if an exception for the constructor is raised.
What is correct to say about the static constructor: (There are four correct answers) Is a special method in the class and is always named CLASS_CONSTRUCTOR Each class can have only one static constructor, and it must be assigned to the public visibility section The static constructor cannot have any importing parameters or exceptions, and it cannot be called explicitly It is called when you access the class for the first time. It is executed no more than once per class, and it can be triggered by creating an instance, accessing a static attribute, calling a static method of the class, or registering an event handler method for an event in the class Each class can have more than one static constructor with different signatures, and it must be assigned to the public visibility section.
What is correct to say about CALL METHOD: (There are three correct answers) Instance methods are called using CALL METHOD ref->method_name You can also drop the CALL METHOD statement and call the method using the syntax ref->method_name() A shorter syntax to call a method is supported as of release 6.10. In this case, CALL METHOD is omitted It is important to note that there must be one space before the parentheses. ref->method_name () This is an instance component selector (=>). This is a static component selector (->).
It is important to know that ABAP Objects also provides a destructor method for the class, ref->destructor() True False.
What is correct to say about events: (There are five correct answers) When an event is triggered, any number of handler methods can be called These methods are called explicitly, one by one, when the event is triggered The definition of the handler method determines to which event it will react You can declare handler methods in as many different classes as necessary To trigger an event, the class must declare the event in the definition part and trigger the method in one of the methods of the same class You can define only instance events. They are defined using the EVENTS statement Events are triggered by using the RAISE EVENT statement in a method of the class.
What is correct to say about events: (There are four correct answers) The event can have exporting parameters that must be passed by reference only. You use these if you want to pass the handler method some information that it may need When an event is triggered, the reference to the triggering object is always available through the predefined importing parameter SENDER By using the parameter SENDER, you can place a reference to the event trigger object in the handler method The SENDER parameter is explicitly defined You can trigger both static events and instance events from instance methods, whereas only static events can be triggered from static methods Events can be assigned to either the public, protected, or private sections. The visibility of the events determines where the event can be handled. An event defined in the public section can be handled in the public method; an event defined in the protected section can be handled by the class itself or its subclasses, whereas events defined in the private section can be handled only within the class itself.
What is correct to say about events: (There are four correct answers) When the event is triggered, the handler methods registered to this event are called in the reverse sequence in which they were registered. Only the handler methods registered for the triggering event is started after the event is triggered You can define any number of handler methods for an event. The handler methods must be defined in another class The event handler methods are not called directly by the client; instead, the runtime system calls the handler method automatically after the event has been triggered. The link between the event and the handler method is established dynamically in the program by using the SET HANDLER statement. Registration is only active at program runtime With the addition FOR ALL INSTANCES you can use just one SET HANDLER statement to register several handlers.
Which of the following statements are true? Select all that apply. (There are two correct answers) Static attributes can be declared only in the private visibility section of the class Static attributes are declared with the CLASS-DATA statement A static attribute is the same across all instances of the class. There is only one static attribute across all instances of the class Static attributes cannot be changed by an object.
Private components of the class cannot be addressed directly from outside the class except when the friendship concept applies True False.
Subclasses can access the private components of the parent class True False.
Subclasses inherit all the components of the parent class True False.
Public methods can access the private attributes of the same class True False.
Protected components can be accessed by the class and subclass. They cannot be addressed directly outside the inheritance tree True False.
You cannot use the LIKE statement to define an attribute in a class True False.
The READ-ONLY addition for the attribute declaration can be used in the private and public visibility section True False.
The READ-ONLY attribute cannot be addressed outside the class True False.
Which of the following statements are correct? Select all that apply. (There are four correct answers) Class methods assigned to the public visibility section can be accessed outside the class using the static component selector and the class name Static methods can be defined in both the public and private visibility section of the class Only public methods can be addressed outside the class You can call private methods within the public methods without reference to the object or class None of the above.
The constructor method is called automatically when you create an instance of the class True False.
The class constructor method is called automatically when you access the class for the first time True False.
The constructor method is always defined in the private visibility section of the class True False.
You can call the constructor method directly True False.
Object or class events can trigger any number of handler methods True False.
In a local class, it is possible to declare an instance constructor in all visibility sections of the class True False.
Declaration of an internal table with a header line can be used in a class implementation True False.
Which components of the class can be accessed in the implementation of a static method in that class? (There are two correct answers) Types Constants All events Instance attributes.
Report abuse Consent Terms of use