Test TAW12 - ingles

Descrição

Test1
Manu montes
Quiz por Manu montes, atualizado more than 1 year ago
Manu montes
Criado por Manu montes mais de 9 anos atrás
51
0

Resumo de Recurso

Questão 1

Questão
A progran needs to gain eecess to the public attributes of class lcl_course. Identi(y the statenents 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. **INSTANTIATION OMITTED **
Responda
  • course_name = name (More than one answer is correct)
  • name can not be accessed unless course1 is instantiated
  • course_name = course1=>name.
  • course_name = course1->name.
  • course_price = lcl_course=>price.

Questão 2

Questão
The concept of restricting direct access to data via hidden interna! processes is best represented by "wich term"
Responda
  • Instantiation
  • Encapsulation
  • Inheritance
  • Polymorphism

Questão 3

Questão
Identify the characteristics of the self reference ME
Responda
  • Self references allow an object to give other objects a reference to it.
  • The self-reference ME can be used to access individual components
  • All answers are correct
  • None of the answers are correct
  • The reference ME can be used to determine the dynamic type of the reference variable in the debugger

Questão 4

Questão
The syntax for instance method specification is (More than one answer is correct)
Responda
  • Call method Objref=>method
  • Call Method->Objref
  • Call method (from within another instance method)
  • Call method Objref->method

Questão 5

Questão
what syntax provides access to individual components of a class within the class (More than one answer is correct)
Responda
  • CALL METHOD object instance->ME->
  • ME->
  • CALL METHOD ME->
  • object instance->ME->

Questão 6

Questão
Identify the ABAP OO Event signature protocols (More than one answer is correct)
Responda
  • Events can only have exporting Parameters
  • Exporting parameters can only be passed by reference
  • Exporting parameters can only be passed by value
  • Events can only have importing Parameters

Questão 7

Questão
Mark the item that is NOT true about the handler table
Responda
  • 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

Questão 8

Questão
In the following nethod, 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.
Responda
  • Exceptions
  • Exporting
  • Changing
  • Receiving

Questão 9

Questão
What inplications ex.ist when private conponents of a class are chanaged
Responda
  • 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

Questão 10

Questão
Finish the following sentence so that it is TRUE. Static Components in an inheritance relationship....... (More than one answer is correct)
Responda
  • 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

Questão 11

Questão
Choose the correct redefinition of the superclass nethod in class lcl_super_course *Super Class Definition CLASS lcl_super_course DEFINITION. PUBLIC SECTION. METHODS: get_course_name IMPORTING im_name type s tring. 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 s tring. ENDCLASS. B CLASS lcl_sub_course DEFINITION INHERITING FROM lcl_super_course. PUBLIC SECTION. METHODS: get_course_name IMPORTING im_name type s tring. ENDCLASS. CLASS lcl_sub_course DEFINITION INHERITING FROM lcl_super_course. PRIVATE SECTION. METHODS: get_course_name REDEFINITION. ENDCLASS. CLASS lcl_sub_course DEFINITION INHERITING FROM lcl_super_course. PUBLIC SECTION. METHODS: get_course_name REDEFINITION. ENDCLASS.
Responda
  • SubClass Definition B
  • SubClass Definition A
  • SubClass Definition C
  • SubClass Definition D

Questão 12

Questão
In the context or Triggering and Handling or Events, mark those which apply (More than one answer is correct)
Responda
  • 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

Questão 13

Questão
An inherited class: (More than one answer is correct)
Responda
  • can remove superclasss components
  • can add components over and above the superclass
  • can access the inherited private components
  • can redefine the public methods of the superclass
  • can not access the protected components

Questão 14

Questão
What is contained in a class that does nor exist in an interface
Responda
  • implementation
  • attributes
  • method
  • definition

Questão 15

Questão
How can a program access private attributes of an object
Responda
  • 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

Questão 16

Questão
Which of the following answers characterize ABAP 00 events (More than one answer is correct)
Responda
  • Classes subscribe to events
  • Classes trigger events
  • Events subscribe to classes
  • Methods subscribe to classes
  • Start-of-selection is an OO event

Questão 17

Questão
Mark the items that characterize some primary differences between objects and functions (More than one answer is correct)
Responda
  • Functions allow multiple instances of the same data objects. Objects only allow single instances of data
  • Calling a function loads the entire function group implicitly into memory whereas instances of an object are generated explicitly when an object is created
  • 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
  • A program can directly access data in the function group while access to data in an object is not possible

Questão 18

Questão
A public attribute 'color' is added to a superclass. A subclass already has the same attribute 'color'. What is the outcome? (More than one answer is correct)
Responda
  • The subclass is invalidated
  • A syntax message will occur
  • The superclass is invalidated
  • A runtime error will occur

Questão 19

Questão
Where would the conponents of a class be defined
Responda
  • Logic component of a program
  • Implementation part of a class
  • Data Component of a program
  • Definition part of Class

Questão 20

Questão
Select the term used for Classes that can implement the same method differently
Responda
  • polymorphism
  • inheritance
  • encapsulation
  • casting
  • instantiation

Questão 21

Questão
What are the rules for event parameters (More than one answer is correct)
Responda
  • 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

Questão 22

Questão
When redefining methods in a subclass what is allowed? (More than one answer is correct)
Responda
  • Code can be changed
  • Only Instance methods
  • Signature can be changed
  • Private Static methods

Questão 23

Questão
define Polynorphisn (More than one answer is correct)
Responda
  • 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

Questão 24

Questão
What are the methods of a class implemented
Responda
  • Object instantiation part of a program
  • Implementation part of a class
  • Definition part of Class
  • Call method of the class

Questão 25

Questão
Your proera" has re¡i.stered severa! handler "ethods. How does the pro¡ra" know what "ethods are available for e>eecution when an event is tr i,a:a;ered your program has registered a several handler method. how does the program know what methos are available for execution when an event is triggered
Responda
  • 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

Questão 26

Questão
A progran needs to gain access to the public attributes of class lcl_course. Identify the statenents 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. (More than one answer is correct)
Responda
  • course_price = lcl_course=>price.
  • course_name = course1->name.
  • course_name = course1=>name.
  • course_name = name
  • course_price = lcl_course->price.

Questão 27

Questão
Class A provides (riendship to Class 8. Class 8 provides friendship to Class C. Identify the valid friend relationship. (More than one answer is correct)
Responda
  • C is 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

Questão 28

Questão
Pick the syntax for a functional nethod with only 1 parameter (More than one answer is correct)
Responda
  • refvar->method returning()
  • refvar->method(p1)
  • refvar->method(im = p1)
  • refvar->method receiving()

Questão 29

Questão
In object orientation, the term USER includes
Responda
  • Events
  • Attributes
  • All of the answers are correct
  • None of the answers are correct

Questão 30

Questão
Initializing an object in a subclass requires that the constructor or the superclass is first called. Identifiy the correct siyntax.
Responda
  • Call Method Super Constructor
  • Call Method Super-> Constructor
  • Call Method Constructor
  • Call Method Constructor-> Super

Questão 31

Questão
Identify the valid statenents that will write out the Static Attributes in the following code 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. (More than one answer is correct)
Responda
  • course_price = lcl_course=>price. Write course_price.
  • write: price.
  • write lcl_course=>price.
  • write lcl_course->price.

Questão 32

Questão
The syntax for static method specification
Responda
  • Call method class name->method
  • Call method class name =>method
  • Call class-method
  • Call Method-> class name

Questão 33

Questão
what triggers an event
Responda
  • Raise Event Inside the Method
  • Call Method
  • None of the answers are correct
  • All answers are correct

Questão 34

Questão
what can be said about the visibility of attributes in the following ina code CLASS lcl_course DEFINITION. PUBLIC SECTION. Data: name type string. PRIVATE SECTION. Data: price type course-price. ENDCLASS. (More than one answer is correct)
Responda
  • 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

Questão 35

Questão
mark the operator used to widen cast of a class
Responda
  • =>
  • =?
  • ->
  • ?=
  • =

Questão 36

Questão
Identify the statements that best describe the visibility of classes (More than one answer is correct)
Responda
  • 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

Questão 37

Questão
Changing the view of an instance of a class with "ore details is referred to as
Responda
  • narrowing cast
  • up cast
  • widening cast
  • dynamic referencing

Questão 38

Questão
what happens when the Set Handler Command is executed
Responda
  • An instance of the event is created
  • The Event Handler Method is registered
  • The Event is triggered
  • The Event is handled

Questão 39

Questão
mark the items that characterize the methods of a Class (More than one answer is correct)
Responda
  • Can change the state of an object
  • Can access only public attributes in their class
  • Can access all attributes in their class
  • Can be defined with a parameter interface
  • Only pass return codes to the calling program

Questão 40

Questão
Refer to the following code and indicate which statenents are true Data: cl_container type ref to cl_gui_custom_container, cl_grid type ref to cl_gui_alv_grid. (More than one answer is correct)
Responda
  • 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

Questão 41

Questão
Local Class lcl_course has been clefined in a progran belonging to developnent class ZCL. wlhat is the key entry in the repository table TADIR
Responda
  • R3TR CLASS
  • R3TR LOCAL CLASS
  • None of the answers are correct
  • R3TR ZCL CLASS
  • R3TR lcl_class

Questão 42

Questão
A MOVE_CAST_ERROR runtine error just occurred. Identify the cause.
Responda
  • 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 correpsonds to the superclass reference variable
  • Super class method is called from the subclass

Questão 43

Questão
Refer to the following code and Select the VRLID 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 'OBJECTS 101'. 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.
Responda
  • 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.

Questão 44

Questão
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.
Responda
  • 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.

Questão 45

Questão
what can be said about the lifeti,e of an object
Responda
  • All answers are correct
  • A an object exists for as long as it is being used in the program
  • An object exists 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.

Questão 46

Questão
Global Class cl_course has been defined using the class builder. The developnent class is ZCL. Mhat is the ke~ entr~ in the repositoru table TAOIR
Responda
  • R3TR ZCL CLASS
  • None of the answers are correct
  • R3TR CLAS cl_course
  • R3TR cl_course
  • R3TR GLOB CLASS

Questão 47

Questão
what statenent will request memory to be allocated to an object
Responda
  • Call Constructor
  • Create Object
  • Call Method
  • Create Constructor

Questão 48

Questão
Refer to the followina code and identify the statenents that are TRUE (More than one answer is correct) CLASS lcl_course DEFINITION. PUBLIC SECTION. METHODS: get_course_name IMPORTING im_name type s tring. 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.
Responda
  • 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
  • Memory is reserved for 2 instances of lcl_course
  • Only one instance of method get_course_name exists
  • Only one instance of method list_prices_and_discounts exists

Questão 49

Questão
Identify the Characteristics of a final Class
Responda
  • No answers are correct
  • all answers are correct
  • methods cannot be explicitly designated as FINAL
  • contains final methods implicitly
  • cannot have subclasses

Questão 50

Questão
Usine the UML modeling language for ABAP 00 desing refer to the follow.ine and indicate .icate the visibity of the componets ------------------- | cl_myclass | ------------------- | +city | | #address | |-----------------| | + get_city() | | - display_addr()| | | |-----------------| (More than one answer is correct)
Responda
  • 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
  • city is a public attribute

Questão 51

Questão
Identify the behaviors of Abstract Classes. (More than one answer is correct)
Responda
  • Methods can only be implemented in the subclass
  • Can only be implemented through an Interface
  • Cannot be instantiated
  • Methods can not be implemented in the subclass

Questão 52

Questão
what is possible uith a subclass in an inheritance relationship to the superclass (More than one answer is correct)
Responda
  • 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

Questão 53

Questão
In the context of polmorphisn and interfaces, mark the item that is NOT true
Responda
  • 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

Questão 54

Questão
Select the answers that apply to static methods and instance methods (More than one answer is correct)
Responda
  • 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 by class name
  • Static methods MUST be addressed by class_name even when object is instantiated

Questão 55

Questão
Identify the valid rule when calling public methods fron within the class
Responda
  • When calling a static method, the class name is required
  • When calling an instance method, the => operator is still required
  • When calling a static method, the class name can be omitted
  • Private methods can not call public methods

Questão 56

Questão
where is the visibility of class components defined
Responda
  • Object Instance
  • Class Methods
  • Class Implementation
  • Class Definition

Questão 57

Questão
Identify the one addition that is not part of the interface of a method
Responda
  • Result
  • Exception
  • Importing
  • Returning

Questão 58

Questão
which statenent will create an instance of a class
Responda
  • Class my_class Definition
  • Data: my_object TYPE REF TO my_class
  • Create Object my_object
  • Class my_class Implementation

Questão 59

Questão
Identify the line that contains the valid use of the READ-ONLY additon 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 READONLY. 50 private section. 60 data: category(15) type C READ-ONLY, 70 class-data: course_count type I READ-ONLY. endclass.
Responda
  • 30
  • 60
  • 50
  • 20
  • 40

Questão 60

Questão
What mechanisn is used to define common components of different classes in one place
Responda
  • Create Object
  • Class Definition
  • Interface
  • Raise Event

Questão 61

Questão
what is the only component that is implenented in the implenentation part ora class
Responda
  • Method
  • Attribute
  • Object
  • Interface
  • Event

Questão 62

Questão
In the context of relationshlp between Super and Sub classes, identify the statenents which apply (More than one answer is correct)
Responda
  • Subclass does not know it’s superclass
  • A subclass is a specialization of a superclass
  • A change in a superclass does not automatically get realized in the subclass
  • Superclass does not know its subclasses
  • A superclass is a specialization of a subclass

Questão 63

Questão
Identify the requirenents that deternine when an object gets deleted by garbage collection (More than one answer is correct)
Responda
  • When all active objects are marked
  • When none of its methods are registered as event handlers
  • When objects can no longer be addressed from main memory
  • When there are no more references pointing to an object

Questão 64

Questão
How do you call the method in a superclass that has the same name as a redefined method in the subclass?
Responda
  • Call Method Superclass-> mymetho
  • Call Method Super-> mymethod.
  • Call Method mymethod.
  • You can't . Only the redefined method can be called

Questão 65

Questão
mark the invalid attribute definition class lcl_course definition. 10 public section. 20 Data: school(20) type c, 30 Supervisor type string value ‘ADAMS’, 40 Price(3) type p decimals 2 value 100 REA D-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.
Responda
  • 30,120
  • 30,80
  • 40,70
  • 70,80
  • 40, 120

Questão 66

Questão
What is true about classes and objects in Object Oriented ABAP (More than one answer is correct)
Responda
  • Classes are an instance of an object
  • Objects can change their class
  • Class is a template for an object
  • Objects are an instance of a class

Questão 67

Questão
Identify the statenent about Global Classes that is NOT true
Responda
  • Class Builder can be used to test global classes
  • A method to be transported is identified in transport organiser as LIMU METH
  • Programs that are available to Global Classes must be associated in Class Builder
  • Global classes are stored in TADIR with key R3TR CLAS
  • Global classes are stored in TADIR with key R3TR CLAS

Semelhante

Escala de planos
TTEA Mejia
test de salto largo
jorgevenegasroja
Test
mafer.rivf
Test relixión tema 1
Paula Lopez
Test del video "Breve historia de las TI"
Pablo Joaquín Ló
TEST GIMNASIA
jorgevenegasroja
TEST SOBRE MARILIA CASTAÑEDA
Hector Leo
Test 1
brenda aguero
Mashup
cuadrosco