ABAP Test on ABAP Objects

Embed Size (px)

Citation preview

  • 7/30/2019 ABAP Test on ABAP Objects

    1/5

    ABAP Test 3

    1. Which of the following is a true statement?

    a. static attributes can be declared only in the private visibility section of the class

    b. static attributes are declared with the CLASS-DATA statement

    c. a static attribute is the same across all instances of the class. There is only one static

    attribute across all instances of the class.

    d. static attributes cannot be changed by an object

    Ans: b,c

    2. Private components of the class cannot be addresses directly from outside the class.

    a. True

    b. false

    Ans: a

    3. Subclasses can access the private components of the parent class.

    a. True

    b. False

    Ans: b

    4. Subclasses inherit all the components of the parent class.

    a. True

    b. False

    Ans: a

    5. Public methods can access the private attributes of the same class.

  • 7/30/2019 ABAP Test on ABAP Objects

    2/5

    ABAP Test 3

    a. True

    b. False

    Ans: a

    6. Protected attributes can be accessed by methods of the class and its subclasses.

    a. True

    b. False

    Ans: a

    7. You cannot use the LIKE statement to define an attribute in a class.

    a. True

    b. False

    Ans: b

    8. The READ-ONLY addition for the attribute declaration can be used in the private and

    public visibility section.

    a. True

    b. False

    Ans: b

    9. The READ-ONLY attribute cannot be addressed outside the class.

    a. True

    b. False

    Ans: b

  • 7/30/2019 ABAP Test on ABAP Objects

    3/5

    ABAP Test 3

    10. Which of the following are true statements?

    a. Class methods assigned to the public visibility section can be accessed outside the class

    using the static component selector and the class name.

    b. Only public methods can be addressed outside the class.

    d. You can call private methods within the public methods without reference to the object or

    class

    e. None of the above.

    Ans:a,b,c

    11. The constructor method is called automatically when you create an instance of the class.

    a. True

    b. False

    Ans: a

    12. The class constructor method is called automatically when you access the class for thefirst time.

    a. True

    b. False

    Ans: a

    13. The constructor method is always defined in the public visibility section of the class withno exceptions.

    a. True

    b. False

    Ans: b

    14. You can call the constructor method directly.

  • 7/30/2019 ABAP Test on ABAP Objects

    4/5

    ABAP Test 3

    a. True

    b. False

    Ans: b

    15. For up-casting, the source reference variable should be more generic than the target

    variable.

    a. True

    b. False

    Ans: a

    16. The character format in SMART FORMS determines:

    a. Font Family

    b. Font size

    c. Font style

    d. All of the above

    Ans: d

    17. Paragraph formats determines: (This question contains more than one correct answer)

    a. Font family and font size

    b. Indents and spacing

    c. Tabsd. Protection of paragraphs against page breaks.

    e. Priting Page numbers

    Ans: a,b,c,d

    18. To retrieve the data which needs to be printed using Smart Forms, you write a separate

    ABAP program or include a retrieval routine into your application.

    a. True

    b. False

    Ans: a

  • 7/30/2019 ABAP Test on ABAP Objects

    5/5

    ABAP Test 3

    19. In ALV reports, a field catalog can be used to format individual rows and data within the

    row:

    a. True

    b. False

    Ans: b

    20. Runtime Analysis for an ABAP program can be performed using following transaction

    code:

    a. SE30

    b. SAT

    c. SRUN

    d. SE30 or SAT

    e. SAT and SRUN

    Ans: d