TAW_12 Chapter 2, Fundamental OO syntax Flashcards

1
Q

What are the two ways to define exceptions in a method definition?

A

EXCEPTIONS
Exception NO_BOB “would set sy-subrc to 1
or
RAISING exception_class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Old school functional methods had only returning and importing params

A

They now have exporting and changing

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

In a class is it possible for an instance attribute to share a name with an instance method?

A

No, but a method can reuse an instance attribute

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

In UML what is the prefix for public, private, and static attributes

A
\+ = public
- = private
_ = Static
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

DATA: obj1 type ref to cl_bob,
obj2 like obj1

Is the above valid?

A

Yes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

DATA lcl_bob type ref to cl_name,
lcl_jim like lcl_bob
LCL_JIM = LCL_BOB
creates how many objects of type name?

A

Only one object exists and both lcl_bob and lcl_jim point to it

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Functional methods can be called in what expressions

A

Move, Case, Loop
If, While, Check, Wait until
Compute (this covers all math basically)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

An instance constructor can have what in it’s signature

A

Importing and Exceptions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

A class-constructor can have what in its signature

A

Basically nothing

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

If I access a static attribute, is the class constructor called?

A

Yes!

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

self reference is

A

me->

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

me-> refers to…?

A

The instance/object reference. In the case where a instance attribute and local method attribute share the same name, me-> will point to the instance level component

How well did you know this?
1
Not at all
2
3
4
5
Perfectly