Page 150 -
P. 150
5.4 Behavioral models 133
Doctor
Name
Phone #
E-mail
Register ( )
De-Register ( )
Hospital Doctor General Practitioner
Figure 5.12 Staff # Practice
A generalization Pager # Address
hierarchy with
added detail
5.3.3 Aggregation
Objects in the real world are often composed of different parts. For example, a study
pack for a course may be composed of a book, PowerPoint slides, quizzes, and rec-
ommendations for further reading. Sometimes in a system model, you need to illus-
trate this. The UML provides a special type of association between classes called
aggregation that means that one object (the whole) is composed of other objects (the
parts). To show this, we use a diamond shape next to the class that represents the
whole. This is shown in Figure 5.13, which shows that a patient record is a composi-
tion of Patient and an indefinite number of Consultations.
5.4 Behavioral models
Behavioral models are models of the dynamic behavior of the system as it is executing.
They show what happens or what is supposed to happen when a system responds to a
stimulus from its environment. You can think of these stimuli as being of two types:
1. Data Some data arrives that has to be processed by the system.
2. Events Some event happens that triggers system processing. Events may have
associated data but this is not always the case.
Patient
Record
1 1
1 1..*
Figure 5.13 The Patient Consultation
aggregation association