Objectives
In this section another example is presented of the
notion of abstract systems
and the employment of event-driven control
to maintain a consistent display of
the internal state of the system.
Points to emphasize
- abstract system -- functional behavior
- user interface -- displayer, prompter
- events -- to define interactions
- dependencies -- interconnections between objects
Hints
An event has only two important moments in its lifetime:
its creation and its activation.
The activation of an event may possibly be repeated.
The class event is an abstract class.
Its derived classes implement actual events,
corresponding to actions of the user of a system.
Question
- Explain how events may be used to regulate
the effects of user actions.
Why are events needed?
Comments
The notion of events employed in this section
resembles the notion of events employed
in discrete event simulation systems.
Both allow to be activated in response to a user action.
Discrete event simulation, however, may involve
explicit timing constraints and scheduling policies.