TAW_12 Chapter 5, Object-Oriented Events Flashcards

1
Q

Events can have Import and Export parameters?

A

No, Events can only have export parameters

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

There are instance and class (static events?

A

True

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

In UML, how are events depicted

A

Under a solid line that separates the methods from events
Under <>
+ On_vehicle_created( )
{ for event = vehicle_created of lcl_vehicle }

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

T or F, static events can only be called by static methods?

A

False, instances can raise static events

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

Can instance constructors trigger events?

A

Yes

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

Give an example of a handler event signature

A

METHODS on_vehicle_create FOR EVENT vehicle_create of lcl_vehicle importing sender

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

What are the two ways a handler method can be triggered?

A

By RAISE EVENT or CALL METHOD

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

Static methods can only trigger static events?

A

True

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

How can the registration of an event handler be deactivated?

A

Using the ACTIVTION ‘ ‘

For example SET HANDLER lcl->on_hotspot for For all instances activation = ‘ ‘

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

Event handlers can only have the same visibility of the events they are handling?

A

False. They can be the same or more restrictive. For example a public event can be handled in a privavte handler, but a private event can not be handled in a public handler

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

Can a class be defined as an interface component?

A

No

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

Can a handler be set within the instance constructor?

A

According to the demo, it is not necessary to have a separate handler class. The handler method can be defined in the instance as a method and set in the constructor

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